OSDN Git Service

QmlDebugger: Fix QML Script Console for mixed debugging
authorKai Koehne <kai.koehne@nokia.com>
Wed, 10 Aug 2011 15:03:33 +0000 (17:03 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Thu, 11 Aug 2011 08:18:49 +0000 (10:18 +0200)
Both the Debugger View and the QML Script Console use
executeDebuggerCommand(...). Forward this to QmlEngine if
the QmlEngine is stopped (because only then teh QML Script Console
is enabled), to C++ otherwise.

Change-Id: I4ba72b56a6205db5346e167b85e9353d05adae41
Reviewed-on: http://codereview.qt.nokia.com/2829
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
src/plugins/debugger/qml/qmlcppengine.cpp

index f103750..e14db93 100644 (file)
@@ -415,7 +415,11 @@ void QmlCppEngine::executeJumpToLine(const ContextData &data)
 
 void QmlCppEngine::executeDebuggerCommand(const QString &command)
 {
-    d->m_cppEngine->executeDebuggerCommand(command);
+    if (d->m_qmlEngine->state() == InferiorStopOk) {
+        d->m_qmlEngine->executeDebuggerCommand(command);
+    } else {
+        d->m_cppEngine->executeDebuggerCommand(command);
+    }
 }
 
 /////////////////////////////////////////////////////////