summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2012-01-13 16:50:08 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2012-01-19 15:34:46 +0100
commit7ad7886b071563dc5f8b449326f3fccff7636ba7 (patch)
treed79d140d55cfe0de492a159a0651652c2d4a4005
parentfa26b986ded4d3af29a21e24453a224a92a0ebc8 (diff)
downloadqt-creator-7ad7886b071563dc5f8b449326f3fccff7636ba7.tar.gz
TC: Use FileName for debuggerCommand()
Change-Id: Ifa168b95d290bfae5c342981c4e4556d6f6913eb Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp2
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp2
-rw-r--r--src/plugins/debugger/debuggertoolchaincombobox.cpp2
-rw-r--r--src/plugins/madde/maemotoolchain.cpp8
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.cpp4
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.h6
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp20
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.h6
-rw-r--r--src/plugins/projectexplorer/gcctoolchainfactories.h2
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp27
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.h2
-rw-r--r--src/plugins/projectexplorer/toolchain.h2
-rw-r--r--src/plugins/projectexplorer/toolchainconfigwidget.cpp10
-rw-r--r--src/plugins/projectexplorer/toolchainconfigwidget.h6
-rw-r--r--src/plugins/projectexplorer/wincetoolchain.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp12
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h6
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h2
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.cpp2
21 files changed, 69 insertions, 66 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index f10fd3c901..d14f0e308d 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -2804,7 +2804,7 @@ QString DebuggerPluginPrivate::debuggerForAbi(const Abi &abi, DebuggerEngineType
ToolChainManager::instance()->findToolChains(searchAbi);
// Find manually configured ones first
for (int i = toolchains.size() - 1; i >= 0; i--) {
- const QString debugger = toolchains.at(i)->debuggerCommand();
+ const QString debugger = toolchains.at(i)->debuggerCommand().toString();
if (debug)
qDebug() << i << toolchains.at(i)->displayName() << debugger;
if (!debugger.isEmpty())
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index d12f0be683..0af3de506a 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -750,7 +750,7 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
if (const ProjectExplorer::BuildConfiguration *buildConfig = target->activeBuildConfiguration()) {
sp.projectBuildDirectory = buildConfig->buildDirectory();
if (const ProjectExplorer::ToolChain *tc = buildConfig->toolChain())
- sp.debuggerCommand = tc->debuggerCommand();
+ sp.debuggerCommand = tc->debuggerCommand().toString();
}
sp.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
}
diff --git a/src/plugins/debugger/debuggertoolchaincombobox.cpp b/src/plugins/debugger/debuggertoolchaincombobox.cpp
index 970bc152da..9704d2388e 100644
--- a/src/plugins/debugger/debuggertoolchaincombobox.cpp
+++ b/src/plugins/debugger/debuggertoolchaincombobox.cpp
@@ -61,7 +61,7 @@ void DebuggerToolChainComboBox::init(bool hostAbiOnly)
foreach (const ProjectExplorer::ToolChain *tc, ProjectExplorer::ToolChainManager::instance()->toolChains()) {
const ProjectExplorer::Abi abi = tc->targetAbi();
if (!hostAbiOnly || hostAbi.os() == abi.os()) { // Offer MSVC and Mingw, etc.
- const QString debuggerCommand = tc->debuggerCommand();
+ const QString debuggerCommand = tc->debuggerCommand().toString();
if (!debuggerCommand.isEmpty()) {
const AbiDebuggerCommandPair data(abi, debuggerCommand);
const QString completeBase = QFileInfo(debuggerCommand).completeBaseName();
diff --git a/src/plugins/madde/maemotoolchain.cpp b/src/plugins/madde/maemotoolchain.cpp
index 1bbdbfac9d..5dac2c184b 100644
--- a/src/plugins/madde/maemotoolchain.cpp
+++ b/src/plugins/madde/maemotoolchain.cpp
@@ -171,7 +171,7 @@ int MaemoToolChain::qtVersionId() const
void MaemoToolChain::updateId()
{
setId(QString::fromLatin1("%1:%2.%3").arg(Constants::MAEMO_TOOLCHAIN_ID)
- .arg(m_qtVersionId).arg(debuggerCommand()));
+ .arg(m_qtVersionId).arg(debuggerCommand().toString()));
}
// --------------------------------------------------------------------------
@@ -191,7 +191,7 @@ MaemoToolChainConfigWidget::MaemoToolChainConfigWidget(MaemoToolChain *tc) :
"<tr><td>Debugger:</td/><td>%3</td></tr></body></html>")
.arg(QDir::toNativeSeparators(MaemoGlobal::maddeRoot(v->qmakeCommand().toString())),
QDir::toNativeSeparators(MaemoGlobal::targetRoot(v->qmakeCommand().toString())),
- QDir::toNativeSeparators(tc->debuggerCommand())));
+ tc->debuggerCommand().toUserOutput()));
layout->addWidget(label);
}
@@ -284,9 +284,9 @@ 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)).toString());
+ mTc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(mqv->qtAbis().at(0)));
if (mTc->debuggerCommand().isEmpty())
- mTc->setDebuggerCommand(MaemoGlobal::targetRoot(mqv->qmakeCommand().toString()) + QLatin1String("/bin/gdb"));
+ mTc->setDebuggerCommand(Utils::FileName::fromString(MaemoGlobal::targetRoot(mqv->qmakeCommand().toString()) + QLatin1String("/bin/gdb")));
result.append(mTc);
}
return result;
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
index ec30ba959e..36562015ac 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
@@ -127,7 +127,7 @@ QString AbstractMsvcToolChain::makeCommand() const
return QLatin1String("nmake.exe");
}
-void AbstractMsvcToolChain::setDebuggerCommand(const QString &d)
+void AbstractMsvcToolChain::setDebuggerCommand(const Utils::FileName &d)
{
if (m_debuggerCommand == d)
return;
@@ -136,7 +136,7 @@ void AbstractMsvcToolChain::setDebuggerCommand(const QString &d)
toolChainUpdated();
}
-QString AbstractMsvcToolChain::debuggerCommand() const
+Utils::FileName AbstractMsvcToolChain::debuggerCommand() const
{
return m_debuggerCommand;
}
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.h b/src/plugins/projectexplorer/abstractmsvctoolchain.h
index 26908a8b83..6e430f40fc 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.h
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.h
@@ -56,9 +56,9 @@ public:
void addToEnvironment(Utils::Environment &env) const;
QString makeCommand() const;
- void setDebuggerCommand(const QString &d);
+ void setDebuggerCommand(const Utils::FileName &d);
- QString debuggerCommand() const;
+ Utils::FileName debuggerCommand() const;
IOutputParser *outputParser() const;
bool canClone() const;
@@ -75,7 +75,7 @@ protected:
const QString& batchArgs,
QMap<QString, QString>& envPairs) const;
- QString m_debuggerCommand;
+ Utils::FileName m_debuggerCommand;
mutable QByteArray m_predefinedMacros;
mutable Utils::Environment m_lastEnvironment; // Last checked 'incoming' environment.
mutable Utils::Environment m_resultEnvironment; // Resulting environment for VC
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 2439ec0b49..070caf0c67 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -314,7 +314,7 @@ void GccToolChain::updateId()
i = i.left(i.indexOf(QLatin1Char(':')));
setId(QString::fromLatin1("%1:%2.%3.%4")
.arg(i).arg(m_compilerPath)
- .arg(m_targetAbi.toString()).arg(m_debuggerCommand));
+ .arg(m_targetAbi.toString()).arg(m_debuggerCommand.toString()));
}
QString GccToolChain::typeName() const
@@ -384,7 +384,7 @@ void GccToolChain::addToEnvironment(Utils::Environment &env) const
env.prependOrSetPath(QFileInfo(m_compilerPath).absolutePath());
}
-void GccToolChain::setDebuggerCommand(const QString &d)
+void GccToolChain::setDebuggerCommand(const Utils::FileName &d)
{
if (m_debuggerCommand == d)
return;
@@ -393,7 +393,7 @@ void GccToolChain::setDebuggerCommand(const QString &d)
toolChainUpdated();
}
-QString GccToolChain::debuggerCommand() const
+Utils::FileName GccToolChain::debuggerCommand() const
{
return m_debuggerCommand;
}
@@ -491,7 +491,7 @@ QVariantMap GccToolChain::toMap() const
foreach (const ProjectExplorer::Abi &a, m_supportedAbis)
abiList.append(a.toString());
data.insert(QLatin1String(supportedAbisKeyC), abiList);
- data.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand);
+ data.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand.toString());
return data;
}
@@ -510,7 +510,7 @@ bool GccToolChain::fromMap(const QVariantMap &data)
continue;
m_supportedAbis.append(abi);
}
- m_debuggerCommand = data.value(QLatin1String(debuggerCommandKeyC)).toString();
+ m_debuggerCommand = Utils::FileName::fromString(data.value(QLatin1String(debuggerCommandKeyC)).toString());
updateId();
return true;
}
@@ -630,10 +630,10 @@ QList<ToolChain *> Internal::GccToolChainFactory::autoDetectToolchains(const QSt
return result;
}
- QString debuggerPath = ToolChainManager::instance()->defaultDebugger(requiredAbi).toString(); // Find the first debugger
+ Utils::FileName debuggerPath = ToolChainManager::instance()->defaultDebugger(requiredAbi);
if (debuggerPath.isEmpty()) {
foreach (const QString &debugger, debuggers) {
- debuggerPath = systemEnvironment.searchInPath(debugger);
+ debuggerPath = Utils::FileName::fromString(systemEnvironment.searchInPath(debugger));
if (!debuggerPath.isEmpty())
break;
}
@@ -700,7 +700,7 @@ void Internal::GccToolChainConfigWidget::apply()
tc->setTargetAbi(m_abiWidget->currentAbi());
tc->setDisplayName(displayName); // reset display name
tc->setDebuggerCommand(debuggerCommand());
- m_autoDebuggerCommand = QLatin1String("<manually set>");
+ m_autoDebuggerCommand = Utils::FileName::fromString(QLatin1String("<manually set>"));
}
void Internal::GccToolChainConfigWidget::setFromToolchain()
@@ -753,7 +753,7 @@ void Internal::GccToolChainConfigWidget::handleAbiChange()
{
if (m_autoDebuggerCommand == debuggerCommand()) {
ProjectExplorer::Abi abi = m_abiWidget->currentAbi();
- m_autoDebuggerCommand = ToolChainManager::instance()->defaultDebugger(abi).toString();
+ m_autoDebuggerCommand = ToolChainManager::instance()->defaultDebugger(abi);
setDebuggerCommand(m_autoDebuggerCommand);
}
emit dirty(toolChain());
@@ -902,7 +902,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()).toString());
+ ->setDebuggerCommand(ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
}
Abi ha = Abi::hostAbi();
diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h
index 8ab8111e5c..be4e3f9bc5 100644
--- a/src/plugins/projectexplorer/gcctoolchain.h
+++ b/src/plugins/projectexplorer/gcctoolchain.h
@@ -67,8 +67,8 @@ public:
void addToEnvironment(Utils::Environment &env) const;
Utils::FileName mkspec() const;
QString makeCommand() const;
- void setDebuggerCommand(const QString &);
- QString debuggerCommand() const;
+ void setDebuggerCommand(const Utils::FileName &);
+ Utils::FileName debuggerCommand() const;
IOutputParser *outputParser() const;
QVariantMap toMap() const;
@@ -102,7 +102,7 @@ private:
void updateSupportedAbis() const;
QString m_compilerPath;
- QString m_debuggerCommand;
+ Utils::FileName m_debuggerCommand;
Abi m_targetAbi;
mutable QList<Abi> m_supportedAbis;
diff --git a/src/plugins/projectexplorer/gcctoolchainfactories.h b/src/plugins/projectexplorer/gcctoolchainfactories.h
index bb961973fe..f6654fcced 100644
--- a/src/plugins/projectexplorer/gcctoolchainfactories.h
+++ b/src/plugins/projectexplorer/gcctoolchainfactories.h
@@ -102,7 +102,7 @@ private:
Utils::PathChooser *m_compilerPath;
AbiWidget *m_abiWidget;
- QString m_autoDebuggerCommand;
+ Utils::FileName m_autoDebuggerCommand;
QList<Abi> m_abiList;
bool m_isReadOnly;
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 805117b18e..2b8b5870f2 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -315,7 +315,7 @@ void MsvcToolChain::updateId()
id += colon;
id += m_varsBatArg;
id += colon;
- id += m_debuggerCommand;
+ id += m_debuggerCommand.toString();
setId(id);
}
@@ -339,7 +339,7 @@ QVariantMap MsvcToolChain::toMap() const
{
QVariantMap data = ToolChain::toMap();
if (!m_debuggerCommand.isEmpty())
- data.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand);
+ data.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand.toString());
data.insert(QLatin1String(varsBatKeyC), m_vcvarsBat);
if (!m_varsBatArg.isEmpty())
data.insert(QLatin1String(varsBatArgKeyC), m_varsBatArg);
@@ -353,7 +353,7 @@ bool MsvcToolChain::fromMap(const QVariantMap &data)
return false;
m_vcvarsBat = data.value(QLatin1String(varsBatKeyC)).toString();
m_varsBatArg = data.value(QLatin1String(varsBatArgKeyC)).toString();
- m_debuggerCommand = data.value(QLatin1String(debuggerCommandKeyC)).toString();
+ m_debuggerCommand = Utils::FileName::fromString(data.value(QLatin1String(debuggerCommandKeyC)).toString());
const QString abiString = data.value(QLatin1String(supportedAbiKeyC)).toString();
m_abi = Abi(abiString);
updateId();
@@ -462,8 +462,8 @@ void MsvcToolChainConfigWidget::autoDetectDebugger()
QTC_ASSERT(tc, return);
ProjectExplorer::Abi abi = tc->targetAbi();
- const QPair<QString, QString> cdbExecutables = MsvcToolChain::autoDetectCdbDebugger();
- QString debugger;
+ const QPair<Utils::FileName, Utils::FileName> cdbExecutables = MsvcToolChain::autoDetectCdbDebugger();
+ Utils::FileName debugger;
if (abi.wordWidth() == 32) {
if (cdbExecutables.first.isEmpty()) {
setErrorMessage(tr("No CDB debugger detected (neither 32bit nor 64bit)."));
@@ -602,7 +602,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
}
}
if (!results.isEmpty()) { // Detect debugger
- const QPair<QString, QString> cdbDebugger = MsvcToolChain::autoDetectCdbDebugger();
+ const QPair<Utils::FileName, Utils::FileName> cdbDebugger = MsvcToolChain::autoDetectCdbDebugger();
foreach (ToolChain *tc, results)
static_cast<MsvcToolChain *>(tc)->setDebuggerCommand(tc->targetAbi().wordWidth() == 32 ? cdbDebugger.first : cdbDebugger.second);
}
@@ -610,10 +610,10 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
return results;
}
-QPair<QString, QString> MsvcToolChain::autoDetectCdbDebugger()
+QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
{
- QPair<QString, QString> result;
- QStringList cdbs;
+ QPair<Utils::FileName, Utils::FileName> result;
+ QList<Utils::FileName> cdbs;
QStringList programDirs;
programDirs.append(QString::fromLocal8Bit(qgetenv("ProgramFiles")));
@@ -626,14 +626,15 @@ QPair<QString, QString> MsvcToolChain::autoDetectCdbDebugger()
QDir dir(dirName);
foreach (const QFileInfo &fi, dir.entryInfoList(QStringList(QLatin1String("Debugging Tools for Windows*")),
QDir::Dirs | QDir::NoDotAndDotDot)) {
- const QString filePath = fi.absoluteFilePath() + QLatin1String("/cdb.exe");
+ Utils::FileName filePath(fi);
+ filePath.appendPath(QLatin1String("cdb.exe"));
if (!cdbs.contains(filePath))
- cdbs.append(fi.absoluteFilePath() + QLatin1String("/cdb.exe"));
+ cdbs.append(filePath);
}
}
- foreach (const QString &cdb, cdbs) {
- QList<ProjectExplorer::Abi> abis = ProjectExplorer::Abi::abisOfBinary(Utils::FileName::fromString(cdb));
+ foreach (const Utils::FileName &cdb, cdbs) {
+ QList<ProjectExplorer::Abi> abis = ProjectExplorer::Abi::abisOfBinary(cdb);
if (abis.isEmpty())
continue;
if (abis.first().wordWidth() == 32)
diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h
index 7fe4f01d2e..82cbaa105f 100644
--- a/src/plugins/projectexplorer/msvctoolchain.h
+++ b/src/plugins/projectexplorer/msvctoolchain.h
@@ -71,7 +71,7 @@ public:
QString varsBatArg() const { return m_varsBatArg; }
- static QPair<QString, QString> autoDetectCdbDebugger();
+ static QPair<Utils::FileName, Utils::FileName> autoDetectCdbDebugger();
protected:
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const;
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index e9c5786e3a..bc57d53740 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -87,7 +87,7 @@ public:
virtual Utils::FileName mkspec() const = 0;
- virtual QString debuggerCommand() const = 0;
+ virtual Utils::FileName debuggerCommand() const = 0;
virtual QString defaultMakeTarget() const;
virtual IOutputParser *outputParser() const = 0;
diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.cpp b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
index d9335f5a02..6af9895009 100644
--- a/src/plugins/projectexplorer/toolchainconfigwidget.cpp
+++ b/src/plugins/projectexplorer/toolchainconfigwidget.cpp
@@ -128,16 +128,16 @@ void ToolChainConfigWidget::addDebuggerAutoDetection(QObject *receiver, const ch
d->m_debuggerPathChooser->addButton(tr("Autodetect"), receiver, autoDetectSlot);
}
-QString ToolChainConfigWidget::debuggerCommand() const
+Utils::FileName ToolChainConfigWidget::debuggerCommand() const
{
- QTC_ASSERT(d->m_debuggerPathChooser, return QString(); )
- return d->m_debuggerPathChooser->path();
+ QTC_ASSERT(d->m_debuggerPathChooser, return Utils::FileName(); )
+ return d->m_debuggerPathChooser->fileName();
}
-void ToolChainConfigWidget::setDebuggerCommand(const QString &debugger)
+void ToolChainConfigWidget::setDebuggerCommand(const Utils::FileName &debugger)
{
QTC_ASSERT(d->m_debuggerPathChooser, return; )
- d->m_debuggerPathChooser->setPath(debugger);
+ d->m_debuggerPathChooser->setFileName(debugger);
}
void ToolChainConfigWidget::addErrorLabel(QFormLayout *lt)
diff --git a/src/plugins/projectexplorer/toolchainconfigwidget.h b/src/plugins/projectexplorer/toolchainconfigwidget.h
index 16216b99c5..f9145b3a61 100644
--- a/src/plugins/projectexplorer/toolchainconfigwidget.h
+++ b/src/plugins/projectexplorer/toolchainconfigwidget.h
@@ -35,6 +35,8 @@
#include "projectexplorer_export.h"
+#include <utils/fileutils.h>
+
#include <QtGui/QWidget>
QT_FORWARD_DECLARE_CLASS(QFormLayout)
@@ -86,8 +88,8 @@ protected:
void addErrorLabel(QFormLayout *lt);
void addErrorLabel(QGridLayout *lt, int row = 0, int column = 0, int colSpan = 1);
- QString debuggerCommand() const;
- void setDebuggerCommand(const QString &debugger);
+ Utils::FileName debuggerCommand() const;
+ void setDebuggerCommand(const Utils::FileName &debugger);
private:
void ensureDebuggerPathChooser(const QStringList &versionArguments);
diff --git a/src/plugins/projectexplorer/wincetoolchain.cpp b/src/plugins/projectexplorer/wincetoolchain.cpp
index 2bb677b763..fdd051506a 100644
--- a/src/plugins/projectexplorer/wincetoolchain.cpp
+++ b/src/plugins/projectexplorer/wincetoolchain.cpp
@@ -292,7 +292,7 @@ void WinCEToolChain::updateId()
id += colon;
id += m_libPath;
id += colon;
- id += m_debuggerCommand;
+ id += m_debuggerCommand.toString();
setId(id);
}
@@ -327,7 +327,7 @@ QVariantMap WinCEToolChain::toMap() const
{
QVariantMap data = ToolChain::toMap();
if (!m_debuggerCommand.isEmpty())
- data.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand);
+ data.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand.toString());
data.insert(QLatin1String(msvcVerKeyC), m_msvcVer);
data.insert(QLatin1String(ceVerKeyC), m_ceVer);
@@ -352,7 +352,7 @@ bool WinCEToolChain::fromMap(const QVariantMap &data)
m_libPath = data.value(QLatin1String(libPathKeyC)).toString();
m_vcvarsBat = data.value(QLatin1String(vcVarsKeyC)).toString();
- m_debuggerCommand = data.value(QLatin1String(debuggerCommandKeyC)).toString();
+ m_debuggerCommand = Utils::FileName::fromString(data.value(QLatin1String(debuggerCommandKeyC)).toString());
const QString abiString = data.value(QLatin1String(supportedAbiKeyC)).toString();
m_abi = Abi(abiString);
updateId();
diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
index 3878937ec6..ab3425e319 100644
--- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
@@ -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()).toString());
+ tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
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()).toString());
+ tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
if (tc->targetAbi() == ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture,
ProjectExplorer::Abi::SymbianOS,
ProjectExplorer::Abi::SymbianDeviceFlavor,
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
index 579d2488db..66817ff88b 100644
--- a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
@@ -292,7 +292,7 @@ QString RvctToolChain::compilerPath() const
return m_compilerPath;
}
-void RvctToolChain::setDebuggerCommand(const QString &d)
+void RvctToolChain::setDebuggerCommand(const Utils::FileName &d)
{
if (m_debuggerCommand == d)
return;
@@ -300,7 +300,7 @@ void RvctToolChain::setDebuggerCommand(const QString &d)
toolChainUpdated();
}
-QString RvctToolChain::debuggerCommand() const
+Utils::FileName RvctToolChain::debuggerCommand() const
{
return m_debuggerCommand;
}
@@ -346,7 +346,7 @@ QVariantMap RvctToolChain::toMap() const
tmp.insert(i.name, i.value);
result.insert(QLatin1String(rvctEnvironmentKeyC), tmp);
result.insert(QLatin1String(rvctArmVersionKeyC), static_cast<int>(m_armVersion));
- result.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand);
+ result.insert(QLatin1String(debuggerCommandKeyC), m_debuggerCommand.toString());
return result;
}
@@ -361,7 +361,7 @@ bool RvctToolChain::fromMap(const QVariantMap &data)
for (QVariantMap::const_iterator i = tmp.constBegin(); i != tmp.constEnd(); ++i)
m_environmentChanges.append(Utils::EnvironmentItem(i.key(), i.value().toString()));
m_armVersion = static_cast<ArmVersion>(data.value(QLatin1String(rvctArmVersionKeyC), 0).toInt());
- m_debuggerCommand = data.value(QLatin1String(debuggerCommandKeyC)).toString();
+ m_debuggerCommand = Utils::FileName::fromString(data.value(QLatin1String(debuggerCommandKeyC)).toString());
return isValid();
}
@@ -369,7 +369,7 @@ void RvctToolChain::updateId()
{
const QChar dot = QLatin1Char('.');
setId(QLatin1String(Constants::RVCT_TOOLCHAIN_ID) + QLatin1Char(':')
- + m_compilerPath + dot + toString(m_armVersion) + dot + m_debuggerCommand);
+ + m_compilerPath + dot + toString(m_armVersion) + dot + m_debuggerCommand.toString());
}
QString RvctToolChain::varName(const QString &postFix) const
@@ -555,7 +555,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()).toString());
+ tc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(tc->targetAbi()));
result.append(tc);
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
index e6105e9257..597ca4cf17 100644
--- a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
+++ b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
@@ -102,8 +102,8 @@ public:
void setCompilerPath(const QString &path);
QString compilerPath() const;
- void setDebuggerCommand(const QString &d);
- virtual QString debuggerCommand() const;
+ void setDebuggerCommand(const Utils::FileName &d);
+ virtual Utils::FileName debuggerCommand() const;
void setArmVersion(ArmVersion);
ArmVersion armVersion() const;
@@ -128,7 +128,7 @@ private:
QList<Utils::EnvironmentItem> m_environmentChanges;
ArmVersion m_armVersion;
mutable RvctVersion m_version;
- QString m_debuggerCommand;
+ Utils::FileName m_debuggerCommand;
friend class RvctToolChainFactory;
};
diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
index 7c72b3301f..6234e1ea61 100644
--- a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
@@ -196,9 +196,9 @@ QString WinscwToolChain::makeCommand() const
#endif
}
-QString WinscwToolChain::debuggerCommand() const
+Utils::FileName WinscwToolChain::debuggerCommand() const
{
- return QString();
+ return Utils::FileName();
}
QString WinscwToolChain::defaultMakeTarget() const
diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h
index 6003e96bbe..7b1fb8b907 100644
--- a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h
+++ b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.h
@@ -62,7 +62,7 @@ public:
void addToEnvironment(Utils::Environment &env) const;
Utils::FileName mkspec() const;
QString makeCommand() const;
- virtual QString debuggerCommand() const;
+ Utils::FileName debuggerCommand() const;
QString defaultMakeTarget() const;
ProjectExplorer::IOutputParser *outputParser() const;
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index 758b57fc23..1bd08f86ed 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -259,7 +259,7 @@ LinuxDeviceConfiguration::ConstPtr RemoteLinuxRunConfiguration::deviceConfig() c
QString RemoteLinuxRunConfiguration::gdbCmd() const
{
- return QDir::toNativeSeparators(activeBuildConfiguration()->toolChain()->debuggerCommand());
+ return activeBuildConfiguration()->toolChain()->debuggerCommand().toUserOutput();
}
RemoteLinuxDeployConfiguration *RemoteLinuxRunConfiguration::deployConfig() const