From 2761e8da5a2167ff673a072435cdf9393aa8cae6 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 30 May 2011 12:56:26 +0200 Subject: [PATCH] debugger: unify naming of sysroot related variables and function Change-Id: I77dd74ba7260622d9fec6cfca4a06d0f817495d8 Reviewed-on: http://codereview.qt.nokia.com/212 Reviewed-by: hjk --- src/plugins/debugger/debuggerdialogs.cpp | 9 ++++---- src/plugins/debugger/debuggerdialogs.h | 11 +++++----- src/plugins/debugger/debuggerplugin.cpp | 22 +++++++++---------- .../debugger/debuggerstartparameters.h | 2 +- src/plugins/debugger/gdb/coregdbadapter.cpp | 6 ++--- .../debugger/gdb/remotegdbserveradapter.cpp | 6 ++--- src/plugins/remotelinux/maemodebugsupport.cpp | 2 +- .../remotelinux/maemoinstalltosysrootstep.cpp | 4 ++-- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index d4c0ef14ae2..ea4059378e6 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -251,13 +251,12 @@ QString AttachCoreDialog::debuggerCommand() return m_ui->toolchainComboBox->debuggerCommand(); } -QString AttachCoreDialog::sysRoot() const - +QString AttachCoreDialog::sysroot() const { return m_ui->sysrootPathChooser->path(); } -void AttachCoreDialog::setSysRoot(const QString &sysroot) +void AttachCoreDialog::setSysroot(const QString &sysroot) { m_ui->sysrootPathChooser->setPath(sysroot); } @@ -789,12 +788,12 @@ bool StartRemoteDialog::useServerStartScript() const return m_ui->useServerStartScriptCheckBox->isChecked(); } -void StartRemoteDialog::setSysRoot(const QString &sysroot) +void StartRemoteDialog::setSysroot(const QString &sysroot) { m_ui->sysrootPathChooser->setPath(sysroot); } -QString StartRemoteDialog::sysRoot() const +QString StartRemoteDialog::sysroot() const { return m_ui->sysrootPathChooser->path(); } diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h index 18d03153536..a225acfc50d 100644 --- a/src/plugins/debugger/debuggerdialogs.h +++ b/src/plugins/debugger/debuggerdialogs.h @@ -88,8 +88,8 @@ public: ProjectExplorer::Abi abi() const; QString debuggerCommand(); - QString sysRoot() const; - void setSysRoot(const QString &sysRoot); + QString sysroot() const; + void setSysroot(const QString &sysroot); QString overrideStartScript() const; void setOverrideStartScript(const QString &scriptName); @@ -203,8 +203,8 @@ public: QString serverStartScript() const; void setServerStartScript(const QString &scriptName); - QString sysRoot() const; - void setSysRoot(const QString &sysRoot); + QString sysroot() const; + void setSysroot(const QString &sysroot); QString debugger() const; void setDebugger(const QString &debugger); @@ -237,7 +237,8 @@ private: QLineEdit *m_lineEdit; }; -class AddressDialog : public QDialog { +class AddressDialog : public QDialog +{ Q_OBJECT public: explicit AddressDialog(QWidget *parent = 0); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 2698d7094e5..d0c315377f2 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -695,7 +695,7 @@ public slots: void attachCore(); void attachCore(const QString &core, const QString &exeFileName, const ProjectExplorer::Abi &abi = ProjectExplorer::Abi(), - const QString &sysRoot = QString(), + const QString &sysroot = QString(), const QString &overrideStartScript = QString(), const QString &debuggerCommand = QString()); void attachRemote(const QString &spec); @@ -1440,7 +1440,7 @@ void DebuggerPluginPrivate::attachCore() dlg.setExecutableFile(configValue(_("LastExternalExecutableFile")).toString()); dlg.setCoreFile(configValue(_("LastExternalCoreFile")).toString()); dlg.setAbiIndex(configValue(_("LastExternalCoreAbiIndex")).toInt()); - dlg.setSysRoot(configValue(_("LastSysroot")).toString()); + dlg.setSysroot(configValue(_("LastSysroot")).toString()); dlg.setOverrideStartScript(configValue(_("LastExternalStartScript")).toString()); if (dlg.exec() != QDialog::Accepted) @@ -1449,16 +1449,16 @@ void DebuggerPluginPrivate::attachCore() setConfigValue(_("LastExternalExecutableFile"), dlg.executableFile()); setConfigValue(_("LastExternalCoreFile"), dlg.coreFile()); setConfigValue(_("LastExternalCoreAbiIndex"), QVariant(dlg.abiIndex())); - setConfigValue(_("LastSysroot"), dlg.sysRoot()); + setConfigValue(_("LastSysroot"), dlg.sysroot()); setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript()); attachCore(dlg.coreFile(), dlg.executableFile(), dlg.abi(), - dlg.sysRoot(), dlg.overrideStartScript()); + dlg.sysroot(), dlg.overrideStartScript()); } void DebuggerPluginPrivate::attachCore(const QString &core, const QString &exe, const ProjectExplorer::Abi &abi, - const QString &sysRoot, + const QString &sysroot, const QString &overrideStartScript, const QString &debuggerCommand) { @@ -1469,7 +1469,7 @@ void DebuggerPluginPrivate::attachCore(const QString &core, sp.startMode = AttachCore; sp.debuggerCommand = debuggerCommand; sp.toolChainAbi = abi.isValid() ? abi : abiOfBinary(sp.coreFile); - sp.sysRoot = sysRoot; + sp.sysroot = sysroot; sp.overrideStartScript = overrideStartScript; if (DebuggerRunControl *rc = createDebugger(sp)) startDebugger(rc); @@ -1547,7 +1547,7 @@ void DebuggerPluginPrivate::startRemoteApplication() configValue(_("LastServerStartScript")).toString()); dlg.setUseServerStartScript( configValue(_("LastUseServerStartScript")).toBool()); - dlg.setSysRoot(configValue(_("LastSysroot")).toString()); + dlg.setSysroot(configValue(_("LastSysroot")).toString()); if (dlg.exec() != QDialog::Accepted) return; setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel()); @@ -1558,7 +1558,7 @@ void DebuggerPluginPrivate::startRemoteApplication() setConfigValue(_("LastRemoteStartScript"), dlg.overrideStartScript()); setConfigValue(_("LastServerStartScript"), dlg.serverStartScript()); setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript()); - setConfigValue(_("LastSysroot"), dlg.sysRoot()); + setConfigValue(_("LastSysroot"), dlg.sysroot()); sp.remoteChannel = dlg.remoteChannel(); sp.remoteArchitecture = dlg.remoteArchitecture(); sp.gnuTarget = dlg.gnuTarget(); @@ -1571,7 +1571,7 @@ void DebuggerPluginPrivate::startRemoteApplication() sp.overrideStartScript = dlg.overrideStartScript(); sp.useServerStartScript = dlg.useServerStartScript(); sp.serverStartScript = dlg.serverStartScript(); - sp.sysRoot = dlg.sysRoot(); + sp.sysroot = dlg.sysroot(); if (RunControl *rc = createDebugger(sp)) startDebugger(rc); } @@ -2399,8 +2399,8 @@ static QString formatStartParameters(DebuggerStartParameters &sp) } if (!sp.gnuTarget.isEmpty()) str << "Gnu target: " << sp.gnuTarget << '\n'; - if (!sp.sysRoot.isEmpty()) - str << "Sysroot: " << sp.sysRoot << '\n'; + if (!sp.sysroot.isEmpty()) + str << "Sysroot: " << sp.sysroot << '\n'; if (!sp.symbolFileName.isEmpty()) str << "Symbol file: " << sp.symbolFileName << '\n'; if (sp.useServerStartScript) diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index 6b0ce2ab1e5..53b797529a1 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -107,7 +107,7 @@ public: QString symbolFileName; bool useServerStartScript; QString serverStartScript; - QString sysRoot; + QString sysroot; QByteArray remoteDumperLib; QByteArray remoteSourcesDir; QString remoteMountPoint; diff --git a/src/plugins/debugger/gdb/coregdbadapter.cpp b/src/plugins/debugger/gdb/coregdbadapter.cpp index c1fd588f1ef..7527795c99e 100644 --- a/src/plugins/debugger/gdb/coregdbadapter.cpp +++ b/src/plugins/debugger/gdb/coregdbadapter.cpp @@ -164,10 +164,10 @@ void CoreGdbAdapter::setupInferior() QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); // Do that first, otherwise no symbols are loaded. QFileInfo fi(m_executable); - const QByteArray sysRoot = startParameters().sysRoot.toLocal8Bit(); + const QByteArray sysroot = startParameters().sysroot.toLocal8Bit(); QByteArray path = fi.absoluteFilePath().toLocal8Bit(); - if (!sysRoot.isEmpty()) - m_engine->postCommand("set sysroot " + sysRoot); + if (!sysroot.isEmpty()) + m_engine->postCommand("set sysroot " + sysroot); m_engine->postCommand("-file-exec-and-symbols \"" + path + '"', CB(handleFileExecAndSymbols)); } diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp index dceacdf3458..525aec35018 100644 --- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp @@ -167,7 +167,7 @@ void RemoteGdbServerAdapter::setupInferior() QFileInfo fi(startParameters().executable); fileName = fi.absoluteFilePath(); } - const QByteArray sysRoot = startParameters().sysRoot.toLocal8Bit(); + const QByteArray sysroot = startParameters().sysroot.toLocal8Bit(); const QByteArray remoteArch = startParameters().remoteArchitecture.toLatin1(); const QByteArray gnuTarget = startParameters().gnuTarget.toLatin1(); const QByteArray solibPath = @@ -178,8 +178,8 @@ void RemoteGdbServerAdapter::setupInferior() m_engine->postCommand("set architecture " + remoteArch); if (!gnuTarget.isEmpty()) m_engine->postCommand("set gnutarget " + gnuTarget); - if (!sysRoot.isEmpty()) - m_engine->postCommand("set sysroot " + sysRoot); + if (!sysroot.isEmpty()) + m_engine->postCommand("set sysroot " + sysroot); if (!solibPath.isEmpty()) m_engine->postCommand("set solib-search-path " + solibPath); if (!args.isEmpty()) diff --git a/src/plugins/remotelinux/maemodebugsupport.cpp b/src/plugins/remotelinux/maemodebugsupport.cpp index b47cd36cd64..2719e0659e0 100644 --- a/src/plugins/remotelinux/maemodebugsupport.cpp +++ b/src/plugins/remotelinux/maemodebugsupport.cpp @@ -70,7 +70,7 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC if (debuggingType != MaemoRunConfiguration::DebugQmlOnly) { params.processArgs = runConfig->arguments(); if (runConfig->activeQt4BuildConfiguration()->qtVersion()) - params.sysRoot = runConfig->activeQt4BuildConfiguration()->qtVersion()->systemRoot(); + params.sysroot = runConfig->activeQt4BuildConfiguration()->qtVersion()->systemRoot(); params.toolChainAbi = runConfig->abi(); if (runConfig->useRemoteGdb()) { params.startMode = StartRemoteGdb; diff --git a/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp b/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp index 7d198807415..50eb9ffe497 100644 --- a/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp +++ b/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp @@ -312,7 +312,7 @@ void MaemoCopyToSysrootStep::run(QFutureInterface &fi) } emit addOutput(tr("Copying files to sysroot ..."), MessageOutput); - QDir sysRootDir(tc->sysroot()); + QDir sysrootDir(tc->sysroot()); const QSharedPointer deployables = qobject_cast(deployConfiguration())->deployables(); const QChar sep = QLatin1Char('/'); @@ -321,7 +321,7 @@ void MaemoCopyToSysrootStep::run(QFutureInterface &fi) const QFileInfo localFileInfo(deployable.localFilePath); const QString targetFilePath = tc->sysroot() + sep + deployable.remoteDir + sep + localFileInfo.fileName(); - sysRootDir.mkpath(deployable.remoteDir.mid(1)); + sysrootDir.mkpath(deployable.remoteDir.mid(1)); QString errorMsg; MaemoGlobal::removeRecursively(targetFilePath, errorMsg); if (!MaemoGlobal::copyRecursively(deployable.localFilePath,