Commit 43465cbe authored by Aurindam Jana's avatar Aurindam Jana

Debugger: Show QML Script Console only for QML debugging

Change-Id: Ibb0f03c77a84ee8682d44944e8a24fac54cb60fe
Reviewed-on: http://codereview.qt-project.org/5329Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 97b4bcfa
......@@ -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()
......
......@@ -699,6 +699,11 @@ DebuggerEngine *QmlCppEngine::cppEngine() const
return d->m_cppEngine;
}
DebuggerEngine *QmlCppEngine::qmlEngine() const
{
return d->m_qmlEngine;
}
} // namespace Internal
} // namespace Debugger
......
......@@ -87,6 +87,8 @@ public:
const QString &expr, const QVariant &value);
DebuggerEngine *cppEngine() const;
DebuggerEngine *qmlEngine() const;
void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
void handleRemoteSetupFailed(const QString &message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment