SVN commit 1005400 by tcanabrava: integration with Qt Script Debugger. what a wonderful piece of software ;D M +1 -0 CMakeLists.txt M +0 -2 Interface/CodeEditor.cpp M +9 -1 Interface/MainWindow.cpp --- trunk/playground/edu/Rocs/src/CMakeLists.txt #1005399:1005400 @@ -23,6 +23,7 @@ ${KDE4_KIO_LIBS} ${KDE4_KTEXTEDITOR_LIBS} ${QT_QTSCRIPT_LIBRARY} + QtScriptTools gvc graph cdt --- trunk/playground/edu/Rocs/src/Interface/CodeEditor.cpp #1005399:1005400 @@ -22,8 +22,6 @@ _editor->setSimpleMode(true); newScript(); setLayout(_layout); - //parent->guiFactory()->addClient( _docView ); - } void CodeEditor::newScript(){ --- trunk/playground/edu/Rocs/src/Interface/MainWindow.cpp #1005399:1005400 @@ -66,6 +66,8 @@ #include #include +#include + MainWindow* mainWindow = 0; MainWindow::MainWindow() : @@ -329,9 +331,15 @@ void MainWindow::executeScript() { if (_activeGraphDocument == 0) { return; } if (_txtDebug == 0) { return; } - + + _txtDebug->clear(); QtScriptBackend *engine = new QtScriptBackend((*_activeGraphDocument), _txtDebug); + QScriptEngineDebugger *e = new QScriptEngineDebugger(this); + + e->attachTo(engine); + //e->action(QScriptEngineDebugger::InterruptAction) + engine->globalObject().setProperty("debug", engine->newFunction(debug_script)); QScriptValue results = engine->evaluate(_codeEditor->text()); _txtDebug->insertPlainText(results.toString());