diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 567f90a36a86326f5da980b8e8d04a4a7728b03a..3458de14a86d093125fa80024ee10ba8a2a2bd26 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -95,11 +95,6 @@ using namespace TextEditor; namespace Debugger { -QString toolChainName(const DebuggerStartParameters &sp) -{ - return ToolChain::toolChainName(ProjectExplorer::ToolChainType(sp.toolChainType)); -} - QDebug operator<<(QDebug d, DebuggerState state) { //return d << DebuggerEngine::stateName(state) << '(' << int(state) << ')'; diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 5fa1a4d0d01aa67d6ecf6f57d3a0dc77f5c33ea2..42673f8bd98a57f84c8d96c2173ebfb2e26b7afe 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -128,8 +128,6 @@ private: quint64 m_address; }; -QString toolChainName(const DebuggerStartParameters &sp); - } // namespace Internal diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 68e33e023391b7b877074081a6d8374eba6aae2f..e918e521d27159324766c9e51ef89075d28194a3 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -94,6 +94,7 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/session.h> #include <projectexplorer/target.h> +#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchaintype.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> @@ -2499,9 +2500,10 @@ void DebuggerPluginPrivate::createNewDock(QWidget *widget) void DebuggerPluginPrivate::runControlStarted(DebuggerEngine *engine) { activateDebugMode(); + QString toolChainName = ToolChain::toolChainName( + ProjectExplorer::ToolChainType((engine->startParameters().toolChainType))); const QString message = tr("Starting debugger '%1' for tool chain '%2'...") - .arg(engine->objectName()) - .arg(toolChainName(engine->startParameters())); + .arg(engine->objectName()).arg(toolChainName); showMessage(message, StatusBar); showMessage(m_debuggerSettings->dump(), LogDebug); m_snapshotHandler->appendSnapshot(engine); diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 4e5748154bc4cfcbe468897145795166f8a2a40e..65a00bbe82b30d27cdce682da0e85d97cb2ef8aa 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -372,8 +372,10 @@ DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration, // Could not find anything suitable. debuggingFinished(); // Create Message box with possibility to go to settings. + QString toolChainName = + ToolChain::toolChainName(ProjectExplorer::ToolChainType(sp.toolChainType)); const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3") - .arg(sp.executable, toolChainName(sp), d->m_errorMessage); + .arg(sp.executable, toolChainName, d->m_errorMessage); Core::ICore::instance()->showWarningWithOptions(tr("Warning"), msg, QString(), QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY), d->m_settingsIdHint);