Commit 2776346d authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Have ToolChainManager::defaultDebugger() return a FileName



Fix fallout of that change.

Change-Id: I2ba7187b232d17d03fecbea63fa68920bdafc5f2
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 35e5f66d
......@@ -284,7 +284,7 @@ QList<ProjectExplorer::ToolChain *> MaemoToolChainFactory::createToolChainList(c
target = "Meego";
mTc->setDisplayName(tr("%1 GCC (%2)").arg(target).arg(MaemoGlobal::maddeRoot(mqv->qmakeCommand().toString())));
mTc->setCompilerPath(MaemoGlobal::targetRoot(mqv->qmakeCommand().toString()) + QLatin1String("/bin/gcc"));
mTc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(mqv->qtAbis().at(0)));
mTc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(mqv->qtAbis().at(0)).toString());
if (mTc->debuggerCommand().isEmpty())
mTc->setDebuggerCommand(MaemoGlobal::targetRoot(mqv->qmakeCommand().toString()) + QLatin1String("/bin/gdb"));
result.append(mTc);
......
......@@ -630,7 +630,7 @@ QList<ToolChain *> Internal::GccToolChainFactory::autoDetectToolchains(const QSt
return result;
}
QString debuggerPath = ToolChainManager::instance()->defaultDebugger(requiredAbi); // Find the first debugger
QString debuggerPath = ToolChainManager::instance()->defaultDebugger(requiredAbi).toString(); // Find the first debugger
if (debuggerPath.isEmpty()) {
foreach (const QString &debugger, debuggers) {
debuggerPath = systemEnvironment.searchInPath(debugger);
......@@ -753,7 +753,7 @@ void Internal::GccToolChainConfigWidget::handleAbiChange()
{
if (m_autoDebuggerCommand == debuggerCommand()) {
ProjectExplorer::Abi abi = m_abiWidget->currentAbi();
m_autoDebuggerCommand = ToolChainManager::instance()->defaultDebugger(abi);
m_autoDebuggerCommand = ToolChainManager::instance()->defaultDebugger(abi).toString();
setDebuggerCommand(m_autoDebuggerCommand);
}
emit dirty(toolChain());
......@@ -919,7 +919,7 @@ QList<ToolChain *> Internal::MingwToolChainFactory::autoDetect()
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()));
->setDebuggerCommand(ToolChainManager::instance()->defaultDebugger(tc->targetAbi()).toString());
}
Abi ha = Abi::hostAbi();
......
......@@ -77,7 +77,7 @@ class ToolChainManagerPrivate
{
public:
QList<ToolChain *> m_toolChains;
QMap<QString, QString> m_abiToDebugger;
QMap<QString, Utils::FileName> m_abiToDebugger;
};
} // namespace Internal
......@@ -181,7 +181,8 @@ void ToolChainManager::restoreToolChains(const QString &fileName, bool autoDetec
const QString pathKey = QString::fromLatin1(DEFAULT_DEBUGGER_PATH_KEY) + QString::number(i);
if (!data.contains(pathKey))
continue;
d->m_abiToDebugger.insert(data.value(abiKey).toString(), data.value(pathKey).toString());
d->m_abiToDebugger.insert(data.value(abiKey).toString(),
Utils::FileName::fromString(data.value(pathKey).toString()));
}
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
......@@ -239,7 +240,7 @@ ToolChain *ToolChainManager::findToolChain(const QString &id) const
return 0;
}
QString ToolChainManager::defaultDebugger(const Abi &abi) const
Utils::FileName ToolChainManager::defaultDebugger(const Abi &abi) const
{
return d->m_abiToDebugger.value(abi.toString());
}
......
......@@ -35,6 +35,8 @@
#include "projectexplorer_export.h"
#include <utils/fileutils.h>
#include <QtCore/QList>
#include <QtCore/QObject>
#include <QtCore/QString>
......@@ -65,7 +67,7 @@ public:
QList<ToolChain *> findToolChains(const Abi &abi) const;
ToolChain *findToolChain(const QString &id) const;
QString defaultDebugger(const Abi &abi) const;
Utils::FileName defaultDebugger(const Abi &abi) const;
public slots:
bool registerToolChain(ProjectExplorer::ToolChain *tc);
......
......@@ -182,7 +182,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()));
tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()).toString());
result.append(tc);
}
}
......@@ -194,7 +194,7 @@ QList<ProjectExplorer::ToolChain *> GcceToolChainFactory::autoDetect()
GcceToolChain *tc = new GcceToolChain(true);
tc->setCompilerPath(fullPath);
tc->setDisplayName(tr("GCCE (%1)").arg(version));
tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()).toString());
if (tc->targetAbi() == ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture,
ProjectExplorer::Abi::SymbianOS,
ProjectExplorer::Abi::SymbianDeviceFlavor,
......
......@@ -554,7 +554,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()));
tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()).toString());
result.append(tc);
}
......
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