Commit 776fd73e authored by hjk's avatar hjk

debugger: don't store active languages twice

Change-Id: I6517b42b4cfd0d2d919fa2971c3ea0995443cbf3
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent e481b1ad
......@@ -428,7 +428,7 @@ static inline Utils::SavedAction *theAssemblerAction()
CdbEngine::CdbEngine(const DebuggerStartParameters &sp,
DebuggerEngine *masterEngine, const OptionsPtr &options) :
DebuggerEngine(sp, CppLanguage, masterEngine),
DebuggerEngine(sp, masterEngine),
m_creatorExtPrefix("<qtcreatorcdbext>|"),
m_tokenPrefix("<token>"),
m_options(options),
......
......@@ -155,13 +155,11 @@ 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),
......@@ -183,8 +181,6 @@ public:
connect(&m_locationTimer, SIGNAL(timeout()), SLOT(resetLocation()));
}
~DebuggerEnginePrivate() {}
public slots:
void doSetupEngine();
void doSetupInferior();
......@@ -282,7 +278,6 @@ public:
DebuggerRunControl *m_runControl; // Not owned.
DebuggerStartParameters m_startParameters;
DebuggerLanguages m_languages;
// The current state.
DebuggerState m_state;
......@@ -336,12 +331,9 @@ public:
//////////////////////////////////////////////////////////////////////
DebuggerEngine::DebuggerEngine(const DebuggerStartParameters &startParameters,
DebuggerLanguages languages,
DebuggerEngine *parentEngine)
: d(new DebuggerEnginePrivate(this, parentEngine, languages, startParameters))
{
d->m_inferiorPid = 0;
}
: d(new DebuggerEnginePrivate(this, parentEngine, startParameters))
{}
DebuggerEngine::~DebuggerEngine()
{
......@@ -1277,11 +1269,6 @@ DebuggerEngine *DebuggerEngine::masterEngine() const
return d->m_masterEngine;
}
DebuggerLanguages DebuggerEngine::languages() const
{
return d->m_languages;
}
QString DebuggerEngine::toFileInProject(const QUrl &fileUrl)
{
// make sure file finder is properly initialized
......
......@@ -140,7 +140,6 @@ class DEBUGGER_EXPORT DebuggerEngine : public QObject
public:
explicit DebuggerEngine(const DebuggerStartParameters &sp,
DebuggerLanguages languages,
DebuggerEngine *parentEngine = 0);
virtual ~DebuggerEngine();
......@@ -266,8 +265,6 @@ public:
bool isMasterEngine() const;
DebuggerEngine *masterEngine() const;
DebuggerLanguages languages() const;
virtual bool setupQmlStep(bool /*on*/) { return false; }
virtual void readyToExecuteQmlStep() {}
......
......@@ -479,7 +479,7 @@ class DummyEngine : public DebuggerEngine
Q_OBJECT
public:
DummyEngine() : DebuggerEngine(DebuggerStartParameters(), AnyLanguage) {}
DummyEngine() : DebuggerEngine(DebuggerStartParameters()) {}
~DummyEngine() {}
void setupEngine() {}
......@@ -2002,7 +2002,7 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine)
engine->watchHandler()->rebuildModel();
mainWindow()->setEngineDebugLanguages(engine->languages());
mainWindow()->setEngineDebugLanguages(engine->startParameters().languages);
mainWindow()->setCurrentEngine(engine);
}
......
......@@ -238,7 +238,7 @@ private:
GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters,
DebuggerEngine *masterEngine)
: DebuggerEngine(startParameters, CppLanguage, masterEngine)
: DebuggerEngine(startParameters, masterEngine)
{
setObjectName(_("GdbEngine"));
......
......@@ -64,7 +64,7 @@ namespace Debugger {
namespace Internal {
IPCEngineHost::IPCEngineHost (const DebuggerStartParameters &startParameters)
: DebuggerEngine(startParameters, CppLanguage)
: DebuggerEngine(startParameters)
, m_localGuest(0)
, m_nextMessagePayloadSize(0)
, m_cookie(1)
......
......@@ -88,7 +88,7 @@ namespace Internal {
///////////////////////////////////////////////////////////////////////
PdbEngine::PdbEngine(const DebuggerStartParameters &startParameters)
: DebuggerEngine(startParameters, AnyLanguage)
: DebuggerEngine(startParameters)
{
setObjectName(QLatin1String("PdbEngine"));
}
......
......@@ -110,7 +110,7 @@ QmlCppEnginePrivate::QmlCppEnginePrivate(QmlCppEngine *parent,
QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp,
DebuggerEngineType slaveEngineType,
QString *errorMessage)
: DebuggerEngine(sp, DebuggerLanguages(CppLanguage) | QmlLanguage), d(new QmlCppEnginePrivate(this, sp))
: DebuggerEngine(sp), d(new QmlCppEnginePrivate(this, sp))
{
setObjectName(QLatin1String("QmlCppEngine"));
d->m_cppEngine = DebuggerRunControlFactory::createEngine(slaveEngineType, sp, this, errorMessage);
......
......@@ -268,7 +268,7 @@ public:
QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters,
DebuggerEngine *masterEngine)
: DebuggerEngine(startParameters, QmlLanguage, masterEngine)
: DebuggerEngine(startParameters, masterEngine)
, m_adapter(this)
, m_inspectorAdapter(&m_adapter, this)
, m_retryOnConnectFail(false)
......
......@@ -203,7 +203,7 @@ void ScriptAgent::scriptUnload(qint64 scriptId)
///////////////////////////////////////////////////////////////////////
ScriptEngine::ScriptEngine(const DebuggerStartParameters &startParameters)
: DebuggerEngine(startParameters, AnyLanguage)
: DebuggerEngine(startParameters)
{
setObjectName(QLatin1String("ScriptEngine"));
}
......
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