forked from qt-creator/qt-creator
Debugger: Make validateExecutable a validateRunParameters
Gets rid of the odd and otherwise unused DebuggerEngine::mutableRunParameters() function. Change-Id: Ib0861432e7c61072db2968acf2f36c7f2d56c89a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1011,7 +1011,7 @@ void DebuggerEngine::setRunTool(DebuggerRunTool *runTool)
|
|||||||
d->m_device = d->m_runParameters.inferior.device;
|
d->m_device = d->m_runParameters.inferior.device;
|
||||||
d->m_terminalRunner = runTool->terminalRunner();
|
d->m_terminalRunner = runTool->terminalRunner();
|
||||||
|
|
||||||
validateExecutable();
|
validateRunParameters(d->m_runParameters);
|
||||||
|
|
||||||
d->setupViews();
|
d->setupViews();
|
||||||
}
|
}
|
||||||
@@ -1080,11 +1080,6 @@ const DebuggerRunParameters &DebuggerEngine::runParameters() const
|
|||||||
return d->m_runParameters;
|
return d->m_runParameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
DebuggerRunParameters &DebuggerEngine::mutableRunParameters() const
|
|
||||||
{
|
|
||||||
return d->m_runParameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
IDevice::ConstPtr DebuggerEngine::device() const
|
IDevice::ConstPtr DebuggerEngine::device() const
|
||||||
{
|
{
|
||||||
return d->m_device;
|
return d->m_device;
|
||||||
@@ -2604,9 +2599,8 @@ Context CppDebuggerEngine::languageContext() const
|
|||||||
return Context(Constants::C_CPPDEBUGGER);
|
return Context(Constants::C_CPPDEBUGGER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppDebuggerEngine::validateExecutable()
|
void CppDebuggerEngine::validateRunParameters(DebuggerRunParameters &rp)
|
||||||
{
|
{
|
||||||
DebuggerRunParameters &rp = mutableRunParameters();
|
|
||||||
const bool warnOnRelease = boolSetting(WarnOnReleaseBuilds) && rp.toolChainAbi.osFlavor() != Abi::AndroidLinuxFlavor;
|
const bool warnOnRelease = boolSetting(WarnOnReleaseBuilds) && rp.toolChainAbi.osFlavor() != Abi::AndroidLinuxFlavor;
|
||||||
bool warnOnInappropriateDebugger = false;
|
bool warnOnInappropriateDebugger = false;
|
||||||
QString detailedWarning;
|
QString detailedWarning;
|
||||||
|
@@ -264,7 +264,7 @@ public:
|
|||||||
void updateWatchData(const QString &iname); // FIXME: Merge with above.
|
void updateWatchData(const QString &iname); // FIXME: Merge with above.
|
||||||
virtual void selectWatchData(const QString &iname);
|
virtual void selectWatchData(const QString &iname);
|
||||||
|
|
||||||
virtual void validateExecutable() {}
|
virtual void validateRunParameters(DebuggerRunParameters &) {}
|
||||||
virtual void prepareForRestart() {}
|
virtual void prepareForRestart() {}
|
||||||
virtual void abortDebuggerProcess() {} // second attempt
|
virtual void abortDebuggerProcess() {} // second attempt
|
||||||
|
|
||||||
@@ -514,7 +514,6 @@ protected:
|
|||||||
void startDying() const;
|
void startDying() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DebuggerRunParameters &mutableRunParameters() const;
|
|
||||||
ProjectExplorer::IDevice::ConstPtr device() const;
|
ProjectExplorer::IDevice::ConstPtr device() const;
|
||||||
DebuggerEngine *companionEngine() const;
|
DebuggerEngine *companionEngine() const;
|
||||||
|
|
||||||
@@ -531,7 +530,7 @@ public:
|
|||||||
CppDebuggerEngine() {}
|
CppDebuggerEngine() {}
|
||||||
~CppDebuggerEngine() override {}
|
~CppDebuggerEngine() override {}
|
||||||
|
|
||||||
void validateExecutable() override;
|
void validateRunParameters(DebuggerRunParameters &rp) override;
|
||||||
Core::Context languageContext() const override;
|
Core::Context languageContext() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user