Revision 62ececb...

Go back to digest for 26th February 2012

Features in Utilities

Friedrich Karl Tilman Pülz committed changes in [publictransport/QtScriptAndThreadWeaver] /:

Add a debugger to TimetableMate

- New debugger class, derived from QScriptEngineAgent
- Many features: Breakpoints (even with JavaScript conditions and
hit counts), execution in steps (step into, step over, step out,
run until cursor, ...), etc.
- New UI for the debugger: Backtrace dock, breakpoints dock,
output dock, variable dock
- Variable dock uses QScriptValueIterator and also shows eg.
details about results added to the 'result' script object
It automatically lists values of Q_PROPERTYs
- Backtrace dock works as expected, automatically updates the
variable dock if another frame gets selected and jumps to the
associated line number if any
- TimetableAccessorInfo is now a QObject with many Q_PROPERTYs and
gets exposed to scripts as "accessor" object
- Add Q_PROPERTYs to scripting objects (scripts can no longer call
methods with the same name, but must use the properties instead,
ie "result.count()" gets "result.count"
- Add debugging actions to TimetableMate
- TODO: The debugger currently calls QApplication::processEvents()
periodically to check if it is still interrupted. Uses too much CPU,
the script should be run in a separate thread

File Changes

Added 2 files
  • /timetablemate/src
  •   engine/debugger.cpp
  •   engine/debugger.h
Modified 13 files
  •   engine/enums.h
  •   engine/scripting.cpp
  •   engine/scripting.h
  •   engine/timetableaccessor.h
  •   engine/timetableaccessor_info.cpp
  •   engine/timetableaccessor_info.h
  •   engine/accessorInfos/de_db.js
  •   engine/timetablemate/src/CMakeLists.txt
  •   engine/timetablemate/src/timetablemate.cpp
  •   engine/timetablemate/src/timetablemate.h
  •   engine/timetablemate/src/timetablemateui.rc
  •   engine/timetablemate/src/timetablemateview.cpp
  •   engine/timetablemate/src/timetablemateview.h
15 files changed in total