Revision 7d6d03d...

Go back to digest for 13th May 2012

Features in KDE Base

Martin Gräßlin committed changes in [kde-workspace] /:

Asserts for KWin scripts

Further debugging functionality for KWin scripts. Added assert
methods validate the to be tested parameter and throw a script
error if the value is not valid.

Following methods are available:
* assert(value)
* assertTrue(boolean)
* assertFalse(boolean)
* assertEquals(expected, actual)
* assertNull(nullValue)
* assertNotNull(notNullValue)

All methods take an additional optional parameter which is used
as the error message if provided.

Methods to validate the number of arguments and types of the
parameters are added and throw syntax or type errors.

REVIEW: 104870

File Changes

Added 1 files
  • kwin/scripting/scriptingutils.cpp
Modified 4 files
  •   kwin/CMakeLists.txt
  •   kwin/scripting/documentation-global.xml
  •   kwin/scripting/scripting.cpp
  •   kwin/scripting/scriptingutils.h
5 files changed in total