summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-01-13 15:33:52 +0100
committerAurindam Jana <aurindam.jana@nokia.com>2012-01-16 12:41:24 +0100
commitde151fc1db8eb5bfc9ef70f0744f4a9f074b8603 (patch)
tree95e97e27f2e9d5f3a0fd2f4307b26d9c81c48ea8 /src/plugins/debugger/debuggerplugin.cpp
parent63187490207bba0e2ab78106fb108c24645301d3 (diff)
downloadqt-creator-de151fc1db8eb5bfc9ef70f0744f4a9f074b8603.tar.gz
ScriptConsole: Refactor
Clean up QmlEngine specific code from debbuger plugin. The logic to check if the current debug engine is qmlengine is done by scriptconsole. It also listens to debug engine state transitions to enable/disable itself accordingly. Change-Id: If21b1167e870e87166b2f7fd6f3283063e47ded0 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index d02d52396d..c799e09f6e 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -62,8 +62,6 @@
#include "watchwindow.h"
#include "watchutils.h"
#include "debuggertooltipmanager.h"
-#include "qml/qmlengine.h"
-#include "qml/qmlcppengine.h"
#include "snapshothandler.h"
#include "threadshandler.h"
@@ -2097,14 +2095,7 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine)
//m_threadBox->setModelColumn(ThreadData::ComboNameColumn);
m_watchersWindow->setModel(engine->watchersModel());
- //Initialize QmlJSConsole
- QmlEngine *qmlEngine = qobject_cast<QmlEngine *>(engine);
- QmlCppEngine *qmlCppEngine = qobject_cast<QmlCppEngine *>(engine);
- if (qmlCppEngine)
- qmlEngine = qobject_cast<QmlEngine *>(qmlCppEngine->qmlEngine());
- if (qmlEngine) {
- m_scriptConsoleWindow->setQmlAdapter(qmlEngine->adapter());
- }
+ m_scriptConsoleWindow->setEngine(engine);
engine->watchHandler()->rebuildModel();
@@ -2376,19 +2367,6 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|| state == InferiorUnrunnable;
setBusyCursor(!notbusy);
- //Console should be enabled only for QML
- QmlEngine *qmlEngine = qobject_cast<QmlEngine *>(engine);
- QmlCppEngine *qmlCppEngine = qobject_cast<QmlCppEngine *>(engine);
- if (qmlCppEngine)
- qmlEngine = qobject_cast<QmlEngine *>(qmlCppEngine->qmlEngine());
-
- if (qmlEngine && (state == InferiorRunOk || state == InferiorStopOk)) {
- m_scriptConsoleWindow->setEnabled(true);
- m_scriptConsoleWindow->setInferiorStopped(state == InferiorStopOk);
- } else {
- m_scriptConsoleWindow->setEnabled(false);
- }
-
}
void DebuggerPluginPrivate::updateDebugActions()