diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-10-12 16:28:33 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-10-13 17:21:49 +0200 |
commit | f8700f19ae41ffc0d2771ce1a622ba8a440bd916 (patch) | |
tree | a87c57e26c1e24d3694a5c7703592acccfd5d5b8 /src | |
parent | b8ed8f493f705f6a91b275f061fa0ee26ce75126 (diff) | |
download | qt-creator-f8700f19ae41ffc0d2771ce1a622ba8a440bd916.tar.gz |
Debugger: Expose which languages (QML, C++, Any) an engine supports
Change-Id: Ia690b5cda84738c303ae7b6bd579e43313728525
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/debugger/cdb/cdbengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerengine.cpp | 11 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerengine.h | 3 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/lldb/ipcenginehost.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/pdb/pdbengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/qml/qmlcppengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/qml/qmlengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/script/scriptengine.cpp | 2 |
10 files changed, 21 insertions, 9 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 3d62f6eec7..587662c0c8 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -436,7 +436,7 @@ static inline Utils::SavedAction *theAssemblerAction() CdbEngine::CdbEngine(const DebuggerStartParameters &sp, DebuggerEngine *masterEngine, const OptionsPtr &options) : - DebuggerEngine(sp, masterEngine), + DebuggerEngine(sp, CppLanguage, masterEngine), m_creatorExtPrefix("<qtcreatorcdbext>|"), m_tokenPrefix("<token>"), m_options(options), diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index a8208eacff..b1a1a631a9 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -139,11 +139,13 @@ class DebuggerEnginePrivate : public QObject public: DebuggerEnginePrivate(DebuggerEngine *engine, DebuggerEngine *masterEngine, + DebuggerLanguages languages, const DebuggerStartParameters &sp) : m_engine(engine), m_masterEngine(masterEngine), m_runControl(0), m_startParameters(sp), + m_languages(languages), m_state(DebuggerNotReady), m_lastGoodState(DebuggerNotReady), m_targetState(DebuggerNotReady), @@ -256,6 +258,7 @@ public: DebuggerRunControl *m_runControl; // Not owned. DebuggerStartParameters m_startParameters; + DebuggerLanguages m_languages; // The current state. DebuggerState m_state; @@ -292,8 +295,9 @@ public: ////////////////////////////////////////////////////////////////////// DebuggerEngine::DebuggerEngine(const DebuggerStartParameters &startParameters, + DebuggerLanguages languages, DebuggerEngine *parentEngine) - : d(new DebuggerEnginePrivate(this, parentEngine, startParameters)) + : d(new DebuggerEnginePrivate(this, parentEngine, languages, startParameters)) { d->m_inferiorPid = 0; } @@ -1133,6 +1137,11 @@ DebuggerEngine *DebuggerEngine::masterEngine() const return d->m_masterEngine; } +DebuggerLanguages DebuggerEngine::languages() const +{ + return d->m_languages; +} + bool DebuggerEngine::debuggerActionsEnabled() const { return debuggerActionsEnabled(d->m_state); diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 4f43fb1ba4..2b5165217d 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -144,6 +144,7 @@ class DEBUGGER_EXPORT DebuggerEngine : public QObject public: explicit DebuggerEngine(const DebuggerStartParameters &sp, + DebuggerLanguages languages, DebuggerEngine *parentEngine = 0); virtual ~DebuggerEngine(); @@ -272,6 +273,8 @@ public: bool isMasterEngine() const; DebuggerEngine *masterEngine() const; + DebuggerLanguages languages() const; + virtual bool setupQmlStep(bool /*on*/) { return false; } virtual void readyToExecuteQmlStep() {} diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index bb06bb951b..cfc4b80d1f 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -475,7 +475,7 @@ class DummyEngine : public DebuggerEngine Q_OBJECT public: - DummyEngine() : DebuggerEngine(DebuggerStartParameters()) {} + DummyEngine() : DebuggerEngine(DebuggerStartParameters(), AnyLanguage) {} ~DummyEngine() {} void setupEngine() {} diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 1f008fbda6..a870c6018f 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -189,7 +189,7 @@ static QByteArray parsePlainConsoleStream(const GdbResponse &response) GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters, DebuggerEngine *masterEngine) - : DebuggerEngine(startParameters, masterEngine) + : DebuggerEngine(startParameters, CppLanguage, masterEngine) { setObjectName(_("GdbEngine")); diff --git a/src/plugins/debugger/lldb/ipcenginehost.cpp b/src/plugins/debugger/lldb/ipcenginehost.cpp index c425777d52..14b9bb2cbb 100644 --- a/src/plugins/debugger/lldb/ipcenginehost.cpp +++ b/src/plugins/debugger/lldb/ipcenginehost.cpp @@ -66,7 +66,7 @@ namespace Debugger { namespace Internal { IPCEngineHost::IPCEngineHost (const DebuggerStartParameters &startParameters) - : DebuggerEngine(startParameters) + : DebuggerEngine(startParameters, CppLanguage) , m_localGuest(0) , m_nextMessagePayloadSize(0) , m_cookie(1) diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp index a8334f96bb..3ff05d3ab5 100644 --- a/src/plugins/debugger/pdb/pdbengine.cpp +++ b/src/plugins/debugger/pdb/pdbengine.cpp @@ -90,7 +90,7 @@ namespace Internal { /////////////////////////////////////////////////////////////////////// PdbEngine::PdbEngine(const DebuggerStartParameters &startParameters) - : DebuggerEngine(startParameters) + : DebuggerEngine(startParameters, AnyLanguage) { setObjectName(QLatin1String("PdbEngine")); } diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index b327e747e9..4525484075 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -139,7 +139,7 @@ void QmlCppEnginePrivate::qmlStackChanged() QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp, DebuggerEngineType slaveEngineType, QString *errorMessage) - : DebuggerEngine(sp), d(new QmlCppEnginePrivate(this, sp)) + : DebuggerEngine(sp, DebuggerLanguages(CppLanguage) | QmlLanguage), d(new QmlCppEnginePrivate(this, sp)) { setObjectName(QLatin1String("QmlCppEngine")); d->m_cppEngine = DebuggerRunControlFactory::createEngine(slaveEngineType, sp, this, errorMessage); diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index b775281610..46ccd86dc9 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -115,7 +115,7 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *q) QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters, DebuggerEngine *masterEngine) - : DebuggerEngine(startParameters, masterEngine), + : DebuggerEngine(startParameters, QmlLanguage, masterEngine), d(new QmlEnginePrivate(this)) { setObjectName(QLatin1String("QmlEngine")); diff --git a/src/plugins/debugger/script/scriptengine.cpp b/src/plugins/debugger/script/scriptengine.cpp index 749b18c67c..374d64ec03 100644 --- a/src/plugins/debugger/script/scriptengine.cpp +++ b/src/plugins/debugger/script/scriptengine.cpp @@ -205,7 +205,7 @@ void ScriptAgent::scriptUnload(qint64 scriptId) /////////////////////////////////////////////////////////////////////// ScriptEngine::ScriptEngine(const DebuggerStartParameters &startParameters) - : DebuggerEngine(startParameters) + : DebuggerEngine(startParameters, AnyLanguage) { setObjectName(QLatin1String("ScriptEngine")); } |