forked from qt-creator/qt-creator
Set debugger when importing tool chains from old settings
Set the default debugger when importing tool chains from old settings. We just left the field blank before. Task-number: QTCREATORBUG-4482 Reviewed-by: dt
This commit is contained in:
@@ -691,6 +691,16 @@ QString Internal::MingwToolChainFactory::id() const
|
||||
|
||||
QList<ToolChain *> Internal::MingwToolChainFactory::autoDetect()
|
||||
{
|
||||
// Compatibility to pre-2.2:
|
||||
// All Mingw toolchains that exist so far are either installed by the SDK itself (in
|
||||
// which case they most likely have debuggers set up) or were created when updating
|
||||
// from a previous Qt version. Add debugger in that case.
|
||||
foreach (ToolChain *tc, ToolChainManager::instance()->toolChains()) {
|
||||
if (tc->debuggerCommand().isEmpty() && tc->id().startsWith(QLatin1String(Constants::MINGW_TOOLCHAIN_ID)))
|
||||
static_cast<MingwToolChain *>(tc)
|
||||
->setDebuggerCommand(ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
|
||||
}
|
||||
|
||||
Abi ha = Abi::hostAbi();
|
||||
return autoDetectToolchains(QLatin1String("g++"), QStringList(),
|
||||
Abi(ha.architecture(), Abi::WindowsOS, Abi::WindowsMSysFlavor, Abi::PEFormat, ha.wordWidth()));
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#include <utils/environment.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
|
||||
@@ -160,6 +161,7 @@ QList<ProjectExplorer::ToolChain *> GcceToolChainFactory::autoDetect()
|
||||
GcceToolChain *tc = new GcceToolChain(false);
|
||||
tc->setCompilerPath(fi.absoluteFilePath());
|
||||
tc->setDisplayName(tr("GCCE from Qt version"));
|
||||
tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
|
||||
result.append(tc);
|
||||
}
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <projectexplorer/abi.h>
|
||||
#include <projectexplorer/headerpath.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/environmentmodel.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
@@ -535,6 +536,7 @@ QList<ProjectExplorer::ToolChain *> RvctToolChainFactory::autoDetect()
|
||||
tc->setDisplayName(name.arg(armVersionString(tc->armVersion()))
|
||||
.arg(v.majorVersion).arg(v.minorVersion).arg(v.build));
|
||||
tc->setVersion(v);
|
||||
tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
|
||||
result.append(tc);
|
||||
}
|
||||
|
||||
|
@@ -185,6 +185,8 @@ QtVersionManager::QtVersionManager()
|
||||
if (tc) {
|
||||
tc->setCompilerPath(fi.absoluteFilePath());
|
||||
tc->setDisplayName(tr("MinGW from %1").arg(version->displayName()));
|
||||
// The debugger is set later in the autoDetect method of the MinGw tool chain factory
|
||||
// as the default debuggers are not yet registered.
|
||||
ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user