Debugger: Show QML Script Console only for QML debugging

Change-Id: Ibb0f03c77a84ee8682d44944e8a24fac54cb60fe
Reviewed-on: http://codereview.qt-project.org/5329
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2011-09-21 16:39:45 +02:00
parent 97b4bcfa6c
commit 43465cbe7a
3 changed files with 19 additions and 1 deletions

View File

@@ -62,6 +62,8 @@
#include "watchwindow.h"
#include "watchutils.h"
#include "debuggertooltipmanager.h"
#include "qml/qmlengine.h"
#include "qml/qmlcppengine.h"
#include "snapshothandler.h"
#include "threadshandler.h"
@@ -2230,7 +2232,16 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|| state == InferiorUnrunnable;
setBusyCursor(!notbusy);
m_scriptConsoleWindow->setEnabled(stopped);
//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) {
m_scriptConsoleWindow->setEnabled(stopped);
}
}
void DebuggerPluginPrivate::updateDebugActions()