[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/edu/Rocs/src
From:       Tomaz Martins dos Santos Canabrava <tomaz.canabrava () gmail ! com>
Date:       2009-07-31 23:07:07
Message-ID: 1249081627.555038.13124.nullmailer () svn ! kde ! org
[Download RAW message or body]

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 <ktexteditor/editor.h>
 #include <ktexteditor/document.h>
 
+#include <qscriptenginedebugger.h>
+
 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());
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic