diff options
Diffstat (limited to 'src/plugins/debugger')
15 files changed, 213 insertions, 214 deletions
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index 246a491594..83d207eead 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -38,8 +38,8 @@ HEADERS += \ debuggerstartparameters.h \ debuggerstreamops.h \ debuggerstringutils.h \ - debuggerprofileconfigwidget.h \ - debuggerprofileinformation.h \ + debuggerkitconfigwidget.h \ + debuggerkitinformation.h \ disassembleragent.h \ disassemblerlines.h \ loadcoredialog.h \ @@ -92,8 +92,8 @@ SOURCES += \ debuggerplugin.cpp \ debuggerrunner.cpp \ debuggerstreamops.cpp \ - debuggerprofileconfigwidget.cpp \ - debuggerprofileinformation.cpp \ + debuggerkitconfigwidget.cpp \ + debuggerkitinformation.cpp \ disassembleragent.cpp \ disassemblerlines.cpp \ loadcoredialog.cpp \ diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index cd1300f276..7538677da2 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -33,10 +33,10 @@ QtcPlugin { files: [ "debugger.qrc", - "debuggerprofileconfigwidget.cpp", - "debuggerprofileconfigwidget.h", - "debuggerprofileinformation.cpp", - "debuggerprofileinformation.h", + "debuggerkitconfigwidget.cpp", + "debuggerkitconfigwidget.h", + "debuggerkitinformation.cpp", + "debuggerkitinformation.h", "basewindow.cpp", "breakhandler.cpp", "breakhandler.h", diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index f27b8c00e4..893cbb13f0 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -32,15 +32,15 @@ #include "debuggerstartparameters.h" #include "debuggerconstants.h" -#include "debuggerprofileinformation.h" +#include "debuggerkitinformation.h" #include "debuggerstringutils.h" #include "cdb/cdbengine.h" #include "shared/hostutils.h" #include <coreplugin/icore.h> #include <projectexplorer/abi.h> -#include <projectexplorer/profilechooser.h> -#include <projectexplorer/profileinformation.h> +#include <projectexplorer/kitchooser.h> +#include <projectexplorer/kitinformation.h> #include <utils/historycompleter.h> #include <utils/pathchooser.h> #include <utils/qtcassert.h> @@ -88,7 +88,7 @@ namespace Internal { class StartApplicationDialogPrivate { public: - ProfileChooser *profileChooser; + KitChooser *kitChooser; PathChooser *localExecutablePathChooser; FancyLineEdit *arguments; PathChooser *workingDirectory; @@ -127,7 +127,7 @@ public: bool operator==(const StartApplicationParameters &p) const { return equals(p); } bool operator!=(const StartApplicationParameters &p) const { return !equals(p); } - Id profileId; + Id kitId; QString localExecutable; QString processArgs; QString workingDirectory; @@ -150,7 +150,7 @@ bool StartApplicationParameters::equals(const StartApplicationParameters &rhs) c && breakAtMain == rhs.breakAtMain && runInTerminal == rhs.runInTerminal && serverStartScript == rhs.serverStartScript - && profileId == rhs.profileId + && kitId == rhs.kitId && debugInfoLocation == rhs.debugInfoLocation; } @@ -167,15 +167,15 @@ QString StartApplicationParameters::displayName() const name += QLatin1String("..."); } - if (Profile *profile = ProfileManager::instance()->find(profileId)) - name += QString::fromLatin1(" (%1)").arg(profile->displayName()); + if (Kit *kit = KitManager::instance()->find(kitId)) + name += QString::fromLatin1(" (%1)").arg(kit->displayName()); return name; } void StartApplicationParameters::toSettings(QSettings *settings) const { - settings->setValue(_("LastProfileId"), profileId.toString()); + settings->setValue(_("LastProfileId"), kitId.toString()); settings->setValue(_("LastExternalExecutable"), localExecutable); settings->setValue(_("LastExternalExecutableArguments"), processArgs); settings->setValue(_("LastExternalWorkingDirectory"), workingDirectory); @@ -187,8 +187,8 @@ void StartApplicationParameters::toSettings(QSettings *settings) const void StartApplicationParameters::fromSettings(const QSettings *settings) { - const QString profileIdString = settings->value(_("LastProfileId")).toString(); - profileId = profileIdString.isEmpty() ? Id() : Id(profileIdString); + const QString kitIdString = settings->value(_("LastProfileId")).toString(); + kitId = kitIdString.isEmpty() ? Id() : Id(kitIdString); localExecutable = settings->value(_("LastExternalExecutable")).toString(); processArgs = settings->value(_("LastExternalExecutableArguments")).toString(); workingDirectory = settings->value(_("LastExternalWorkingDirectory")).toString(); @@ -225,7 +225,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent) d->runInTerminalCheckBox = new QCheckBox(this); - d->profileChooser = new ProfileChooser(this, ProfileChooser::LocalDebugging); + d->kitChooser = new KitChooser(this, KitChooser::LocalDebugging); d->breakAtMainCheckBox = new QCheckBox(this); d->breakAtMainCheckBox->setText(QString()); @@ -263,7 +263,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent) QFormLayout *formLayout = new QFormLayout(); formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - formLayout->addRow(tr("&Target:"), d->profileChooser); + formLayout->addRow(tr("&Kit:"), d->kitChooser); formLayout->addRow(tr("Local &executable:"), d->localExecutablePathChooser); formLayout->addRow(tr("Command line &arguments:"), d->arguments); formLayout->addRow(tr("&Working directory:"), d->workingDirectory); @@ -319,9 +319,9 @@ void StartApplicationDialog::historyIndexChanged(int index) setParameters(v.value<StartApplicationParameters>()); } -Id StartApplicationDialog::profileId() const +Id StartApplicationDialog::kitId() const { - return d->profileChooser->currentProfileId(); + return d->kitChooser->currentKitId(); } void StartApplicationDialog::updateState() @@ -373,9 +373,9 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS settings->endGroup(); } - Profile *profile = dialog.d->profileChooser->currentProfile(); - QTC_ASSERT(profile, return false); - fillParameters(sp, profile); + Kit *kit = dialog.d->kitChooser->currentKit(); + QTC_ASSERT(kit, return false); + fillParameters(sp, kit); sp->executable = newParameters.localExecutable; sp->displayName = newParameters.displayName(); @@ -387,7 +387,7 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS sp->serverStartScript = newParameters.serverStartScript; sp->debugInfoLocation = newParameters.debugInfoLocation; - bool isLocal = DeviceProfileInformation::device(profile)->type() + bool isLocal = DeviceKitInformation::device(kit)->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; sp->startMode = isLocal ? StartExternal : StartRemoteProcess; return true; @@ -398,7 +398,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const StartApplicationParameters result; result.localExecutable = d->localExecutablePathChooser->path(); result.serverStartScript = d->serverStartScriptPathChooser->path(); - result.profileId = d->profileChooser->currentProfileId(); + result.kitId = d->kitChooser->currentKitId(); result.debugInfoLocation = d->debuginfoPathChooser->path(); result.processArgs = d->arguments->text(); result.workingDirectory = d->workingDirectory->path(); @@ -409,7 +409,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const void StartApplicationDialog::setParameters(const StartApplicationParameters &p) { - d->profileChooser->setCurrentProfileId(p.profileId); + d->kitChooser->setCurrentKitId(p.kitId); d->localExecutablePathChooser->setPath(p.localExecutable); d->serverStartScriptPathChooser->setPath(p.serverStartScript); d->debuginfoPathChooser->setPath(p.debugInfoLocation); @@ -430,7 +430,7 @@ class AttachToQmlPortDialogPrivate { public: QSpinBox *portSpinBox; - ProfileChooser *profileChooser; + KitChooser *kitChooser; }; AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent) @@ -440,7 +440,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Start Debugger")); - d->profileChooser = new ProfileChooser(this); + d->kitChooser = new KitChooser(this); d->portSpinBox = new QSpinBox(this); d->portSpinBox->setMaximum(65535); @@ -451,7 +451,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent) buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); QFormLayout *formLayout = new QFormLayout(); - formLayout->addRow(tr("Target:"), d->profileChooser); + formLayout->addRow(tr("Kit:"), d->kitChooser); formLayout->addRow(tr("&Port:"), d->portSpinBox); QVBoxLayout *verticalLayout = new QVBoxLayout(this); @@ -477,14 +477,14 @@ int AttachToQmlPortDialog::port() const return d->portSpinBox->value(); } -Profile *AttachToQmlPortDialog::profile() const +Kit *AttachToQmlPortDialog::kit() const { - return d->profileChooser->currentProfile(); + return d->kitChooser->currentKit(); } -void AttachToQmlPortDialog::setProfileId(const Id &id) +void AttachToQmlPortDialog::setKitId(const Id &id) { - d->profileChooser->setCurrentProfileId(id); + d->kitChooser->setCurrentKitId(id); } // --------- StartRemoteCdbDialog diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h index 49e32347a2..a8d8274c60 100644 --- a/src/plugins/debugger/debuggerdialogs.h +++ b/src/plugins/debugger/debuggerdialogs.h @@ -44,7 +44,7 @@ class QSettings; QT_END_NAMESPACE namespace Core { class Id; } -namespace ProjectExplorer { class Profile; } +namespace ProjectExplorer { class Kit; } namespace Debugger { class DebuggerStartParameters; @@ -78,7 +78,7 @@ private: void setParameters(const StartApplicationParameters &p); void setHistory(const QList<StartApplicationParameters> &l); void hideStartScript(); - Core::Id profileId() const; + Core::Id kitId() const; StartApplicationDialogPrivate *d; }; @@ -94,8 +94,8 @@ public: int port() const; void setPort(const int port); - ProjectExplorer::Profile *profile() const; - void setProfileId(const Core::Id &id); + ProjectExplorer::Kit *kit() const; + void setKitId(const Core::Id &id); private: AttachToQmlPortDialogPrivate *d; diff --git a/src/plugins/debugger/debuggerprofileconfigwidget.cpp b/src/plugins/debugger/debuggerkitconfigwidget.cpp index 81789acfb1..96cf2b04a7 100644 --- a/src/plugins/debugger/debuggerprofileconfigwidget.cpp +++ b/src/plugins/debugger/debuggerkitconfigwidget.cpp @@ -28,12 +28,12 @@ ** **************************************************************************/ -#include "debuggerprofileconfigwidget.h" +#include "debuggerkitconfigwidget.h" -#include "debuggerprofileinformation.h" +#include "debuggerkitinformation.h" #include <projectexplorer/abi.h> -#include <projectexplorer/profileinformation.h> +#include <projectexplorer/kitinformation.h> #include <utils/pathchooser.h> #include <utils/qtcassert.h> @@ -56,23 +56,23 @@ namespace Internal { static const char dgbToolsDownloadLink32C[] = "http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx"; static const char dgbToolsDownloadLink64C[] = "http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx"; // ----------------------------------------------------------------------- -// DebuggerProfileConfigWidget: +// DebuggerKitConfigWidget: // ----------------------------------------------------------------------- -DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profile *p, - const DebuggerProfileInformation *pi, - QWidget *parent) : - ProjectExplorer::ProfileConfigWidget(parent), - m_profile(p), - m_info(pi), +DebuggerKitConfigWidget::DebuggerKitConfigWidget(ProjectExplorer::Kit *k, + const DebuggerKitInformation *ki, + QWidget *parent) : + ProjectExplorer::KitConfigWidget(parent), + m_kit(k), + m_info(ki), m_chooser(new Utils::PathChooser) { - setToolTip(tr("The debugger to use for this target.")); + setToolTip(tr("The debugger to use for this kit.")); QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(0); - ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p); + ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); if (tc && tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS && tc->targetAbi().osFlavor() != ProjectExplorer::Abi::WindowsMSysFlavor) { QLabel *msvcDebuggerConfigLabel = new QLabel; @@ -104,43 +104,42 @@ DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profil connect(m_chooser, SIGNAL(changed(QString)), this, SIGNAL(dirty())); } -QString DebuggerProfileConfigWidget::displayName() const +QString DebuggerKitConfigWidget::displayName() const { return tr("Debugger:"); } -void DebuggerProfileConfigWidget::makeReadOnly() +void DebuggerKitConfigWidget::makeReadOnly() { m_chooser->setEnabled(false); } -void DebuggerProfileConfigWidget::apply() +void DebuggerKitConfigWidget::apply() { Utils::FileName fn = m_chooser->fileName(); - DebuggerProfileInformation::setDebuggerCommand(m_profile, fn); + DebuggerKitInformation::setDebuggerCommand(m_kit, fn); } -void DebuggerProfileConfigWidget::discard() +void DebuggerKitConfigWidget::discard() { - m_chooser->setFileName(DebuggerProfileInformation::debuggerCommand(m_profile)); + m_chooser->setFileName(DebuggerKitInformation::debuggerCommand(m_kit)); } -bool DebuggerProfileConfigWidget::isDirty() const +bool DebuggerKitConfigWidget::isDirty() const { - return m_chooser->fileName() != DebuggerProfileInformation::debuggerCommand(m_profile); + return m_chooser->fileName() != DebuggerKitInformation::debuggerCommand(m_kit); } -QWidget *DebuggerProfileConfigWidget::buttonWidget() const +QWidget *DebuggerKitConfigWidget::buttonWidget() const { return m_chooser->buttonAtIndex(1); } -void DebuggerProfileConfigWidget::autoDetectDebugger() +void DebuggerKitConfigWidget::autoDetectDebugger() { - QVariant v = m_info->defaultValue(m_profile); + QVariant v = m_info->defaultValue(m_kit); m_chooser->setFileName(Utils::FileName::fromString(v.toString())); } } // namespace Internal - } // namespace Debugger diff --git a/src/plugins/debugger/debuggerprofileconfigwidget.h b/src/plugins/debugger/debuggerkitconfigwidget.h index f87b89f1b3..b818f3817f 100644 --- a/src/plugins/debugger/debuggerprofileconfigwidget.h +++ b/src/plugins/debugger/debuggerkitconfigwidget.h @@ -28,33 +28,33 @@ ** **************************************************************************/ -#ifndef DEBUGGER_DEBUGGERPROFILECONFIGWIDGET_H -#define DEBUGGER_DEBUGGERPROFILECONFIGWIDGET_H +#ifndef DEBUGGER_DEBUGGERKITCONFIGWIDGET_H +#define DEBUGGER_DEBUGGERKITCONFIGWIDGET_H -#include <projectexplorer/profileconfigwidget.h> +#include <projectexplorer/kitconfigwidget.h> #include <QLabel> -#include <debuggerprofileinformation.h> +#include <debuggerkitinformation.h> -namespace ProjectExplorer { class Profile; } +namespace ProjectExplorer { class Kit; } namespace Utils { class PathChooser; } namespace Debugger { -class DebuggerProfileInformation; +class DebuggerKitInformation; namespace Internal { // ----------------------------------------------------------------------- -// DebuggerProfileConfigWidget: +// DebuggerKitConfigWidget: // ----------------------------------------------------------------------- -class DebuggerProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget +class DebuggerKitConfigWidget : public ProjectExplorer::KitConfigWidget { Q_OBJECT public: - DebuggerProfileConfigWidget(ProjectExplorer::Profile *p, - const DebuggerProfileInformation *pi, - QWidget *parent = 0); + DebuggerKitConfigWidget(ProjectExplorer::Kit *p, + const DebuggerKitInformation *ki, + QWidget *parent = 0); QString displayName() const; @@ -69,12 +69,12 @@ private slots: void autoDetectDebugger(); private: - ProjectExplorer::Profile *m_profile; - const DebuggerProfileInformation *m_info; + ProjectExplorer::Kit *m_kit; + const DebuggerKitInformation *m_info; Utils::PathChooser *m_chooser; }; } // namespace Internal } // namespace Debugger -#endif // DEBUGGER_DEBUGGERPROFILEINFORMATION_H +#endif // DEBUGGER_DEBUGGERKITINFORMATION_H diff --git a/src/plugins/debugger/debuggerprofileinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index f794bbc634..8d7db74f57 100644 --- a/src/plugins/debugger/debuggerprofileinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -28,9 +28,9 @@ ** **************************************************************************/ -#include "debuggerprofileinformation.h" +#include "debuggerkitinformation.h" -#include "debuggerprofileconfigwidget.h" +#include "debuggerkitconfigwidget.h" #include <projectexplorer/abi.h> #include <projectexplorer/projectexplorerconstants.h> @@ -115,30 +115,30 @@ static QPair<QString, QString> autoDetectCdbDebugger() namespace Debugger { // -------------------------------------------------------------------------- -// DebuggerProfileInformation: +// DebuggerKitInformation: // -------------------------------------------------------------------------- static const char DEBUGGER_INFORMATION[] = "Debugger.Information"; -DebuggerProfileInformation::DebuggerProfileInformation() +DebuggerKitInformation::DebuggerKitInformation() { - setObjectName(QLatin1String("DebuggerProfileInformation")); + setObjectName(QLatin1String("DebuggerKitInformation")); } -Core::Id DebuggerProfileInformation::dataId() const +Core::Id DebuggerKitInformation::dataId() const { static Core::Id id = Core::Id(DEBUGGER_INFORMATION); return id; } -unsigned int DebuggerProfileInformation::priority() const +unsigned int DebuggerKitInformation::priority() const { return 28000; } -QVariant DebuggerProfileInformation::defaultValue(Profile *p) const +QVariant DebuggerKitInformation::defaultValue(Kit *k) const { - ToolChain *tc = ToolChainProfileInformation::toolChain(p); + ToolChain *tc = ToolChainKitInformation::toolChain(k); Abi abi = Abi::hostAbi(); if (tc) abi = tc->targetAbi(); @@ -166,11 +166,11 @@ QVariant DebuggerProfileInformation::defaultValue(Profile *p) const return env.searchInPath(debugger); } -QList<Task> DebuggerProfileInformation::validate(Profile *p) const +QList<Task> DebuggerKitInformation::validate(Kit *k) const { const Core::Id id(Constants::TASK_CATEGORY_BUILDSYSTEM); QList<Task> result; - FileName dbg = debuggerCommand(p); + FileName dbg = debuggerCommand(k); if (dbg.isEmpty()) { result << Task(Task::Warning, tr("No debugger set up."), FileName(), -1, id); return result; @@ -182,7 +182,7 @@ QList<Task> DebuggerProfileInformation::validate(Profile *p) const else if (!fi.isExecutable()) result << Task(Task::Error, tr("Debugger not exectutable."), FileName(), -1, id); - if (ToolChain *tc = ToolChainProfileInformation::toolChain(p)) { + if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) { // We need an absolute path to be able to locate Python on Windows. const Abi abi = tc->targetAbi(); if (abi.os() == Abi::WindowsOS && !fi.isAbsolute()) { @@ -202,25 +202,25 @@ QList<Task> DebuggerProfileInformation::validate(Profile *p) const return result; } -ProfileConfigWidget *DebuggerProfileInformation::createConfigWidget(Profile *p) const +KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const { - return new Internal::DebuggerProfileConfigWidget(p, this); + return new Internal::DebuggerKitConfigWidget(k, this); } -ProfileInformation::ItemList DebuggerProfileInformation::toUserOutput(Profile *p) const +KitInformation::ItemList DebuggerKitInformation::toUserOutput(Kit *k) const { - return ItemList() << qMakePair(tr("Debugger"), debuggerCommand(p).toUserOutput()); + return ItemList() << qMakePair(tr("Debugger"), debuggerCommand(k).toUserOutput()); } -FileName DebuggerProfileInformation::debuggerCommand(const Profile *p) +FileName DebuggerKitInformation::debuggerCommand(const Kit *k) { - return FileName::fromString(p ? p->value(Core::Id(DEBUGGER_INFORMATION)).toString() : QString()); + return FileName::fromString(k ? k->value(Core::Id(DEBUGGER_INFORMATION)).toString() : QString()); } -void DebuggerProfileInformation::setDebuggerCommand(Profile *p, const FileName &command) +void DebuggerKitInformation::setDebuggerCommand(Kit *k, const FileName &command) { - QTC_ASSERT(p, return); - p->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString()); + QTC_ASSERT(k, return); + k->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString()); } } // namespace Debugger diff --git a/src/plugins/debugger/debuggerprofileinformation.h b/src/plugins/debugger/debuggerkitinformation.h index ae409c96f5..e6d9dab6c8 100644 --- a/src/plugins/debugger/debuggerprofileinformation.h +++ b/src/plugins/debugger/debuggerkitinformation.h @@ -28,38 +28,38 @@ ** **************************************************************************/ -#ifndef DEBUGGER_DEBUGGERPROFILEINFORMATION_H -#define DEBUGGER_DEBUGGERPROFILEINFORMATION_H +#ifndef DEBUGGER_DEBUGGERKITINFORMATION_H +#define DEBUGGER_DEBUGGERKITINFORMATION_H #include "debugger_global.h" -#include <projectexplorer/profileinformation.h> +#include <projectexplorer/kitinformation.h> namespace Debugger { -class DEBUGGER_EXPORT DebuggerProfileInformation : public ProjectExplorer::ProfileInformation +class DEBUGGER_EXPORT DebuggerKitInformation : public ProjectExplorer::KitInformation { Q_OBJECT public: - DebuggerProfileInformation(); + DebuggerKitInformation(); Core::Id dataId() const; unsigned int priority() const; // the higher the closer to the top. - QVariant defaultValue(ProjectExplorer::Profile *p) const; + QVariant defaultValue(ProjectExplorer::Kit *k) const; - QList<ProjectExplorer::Task> validate(ProjectExplorer::Profile *p) const; + QList<ProjectExplorer::Task> validate(ProjectExplorer::Kit *k) const; - ProjectExplorer::ProfileConfigWidget *createConfigWidget(ProjectExplorer::Profile *p) const; + ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const; - ItemList toUserOutput(ProjectExplorer::Profile *p) const; + ItemList toUserOutput(ProjectExplorer::Kit *k) const; - static Utils::FileName debuggerCommand(const ProjectExplorer::Profile *p); - static void setDebuggerCommand(ProjectExplorer::Profile *p, const Utils::FileName &command); + static Utils::FileName debuggerCommand(const ProjectExplorer::Kit *k); + static void setDebuggerCommand(ProjectExplorer::Kit *k, const Utils::FileName &command); }; } // namespace Debugger -#endif // DEBUGGER_DEBUGGERPROFILEINFORMATION_H +#endif // DEBUGGER_DEBUGGERKITINFORMATION_H diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 13546e60fe..9ebe994858 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -41,7 +41,7 @@ #include "debuggerrunner.h" #include "debuggerruncontrolfactory.h" #include "debuggerstringutils.h" -#include "debuggerprofileinformation.h" +#include "debuggerkitinformation.h" #include "memoryagent.h" #include "breakpoint.h" #include "breakhandler.h" @@ -101,9 +101,9 @@ #include <projectexplorer/projectexplorersettings.h> #include <projectexplorer/project.h> #include <projectexplorer/session.h> -#include <projectexplorer/profilechooser.h> -#include <projectexplorer/profileinformation.h> -#include <projectexplorer/profilemanager.h> +#include <projectexplorer/kitchooser.h> +#include <projectexplorer/kitinformation.h> +#include <projectexplorer/kitmanager.h> #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> #include <projectexplorer/toolchainmanager.h> @@ -561,13 +561,13 @@ static inline QString executableForPid(qint64 pid) return QString(); } -class AbiProfileMatcher : public ProfileMatcher +class AbiKitMatcher : public KitMatcher { public: - explicit AbiProfileMatcher(const QList<Abi> &abis) : m_abis(abis) {} - bool matches(const Profile *p) const + explicit AbiKitMatcher(const QList<Abi> &abis) : m_abis(abis) {} + bool matches(const Kit *p) const { - if (const ToolChain *tc = ToolChainProfileInformation::toolChain(p)) + if (const ToolChain *tc = ToolChainKitInformation::toolChain(p)) return m_abis.contains(tc->targetAbi()); return false; } @@ -576,13 +576,13 @@ private: const QList<Abi> m_abis; }; -class CompatibleAbiProfileMatcher : public ProfileMatcher +class CompatibleAbiKitMatcher : public KitMatcher { public: - explicit CompatibleAbiProfileMatcher(const QList<Abi> &abis) : m_abis(abis) {} - bool matches(const Profile *p) const + explicit CompatibleAbiKitMatcher(const QList<Abi> &abis) : m_abis(abis) {} + bool matches(const Kit *p) const { - if (const ToolChain *tc = ToolChainProfileInformation::toolChain(p)) + if (const ToolChain *tc = ToolChainKitInformation::toolChain(p)) foreach (const Abi &a, m_abis) if (a.isCompatibleWith(tc->targetAbi())) return true; @@ -593,14 +593,14 @@ private: const QList<Abi> m_abis; }; -class CdbMatcher : ProfileMatcher +class CdbMatcher : KitMatcher { public: CdbMatcher(char wordWidth = 0) : m_wordWidth(wordWidth) {} - bool matches(const Profile *profile) const + bool matches(const Kit *k) const { - const ToolChain *tc = ToolChainProfileInformation::toolChain(profile); + const ToolChain *tc = ToolChainKitInformation::toolChain(k); QTC_ASSERT(tc, return false); const Abi abi = tc->targetAbi(); if (abi.architecture() != Abi::X86Architecture @@ -615,31 +615,31 @@ public: return true; } - // Find a CDB profile for debugging unknown processes. + // Find a CDB kit for debugging unknown processes. // On a 64bit OS, prefer a 64bit debugger. - static Profile *findUniversalCdbProfile() + static Kit *findUniversalCdbKit() { #ifdef Q_OS_WIN if (Utils::winIs64BitSystem()) { CdbMatcher matcher64(64); - if (Profile *cdb64Profile = ProfileManager::instance()->find(&matcher64)) - return cdb64Profile; + if (Kit *cdb64Kit = KitManager::instance()->find(&matcher64)) + return cdb64Kit; } #endif CdbMatcher matcher; - return ProfileManager::instance()->find(&matcher); + return KitManager::instance()->find(&matcher); } private: const char m_wordWidth; }; -void fillParameters(DebuggerStartParameters *sp, const Profile *profile /* = 0 */) +void fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */) { - if (!profile) { + if (!kit) { // This code can only be reached when starting via the command line // (-debug pid or executable) or attaching from runconfiguration - // without specifying a profile. Try to find a profile via ABI. + // without specifying a kit. Try to find a kit via ABI. QList<Abi> abis; if (sp->toolChainAbi.isValid()) { abis.push_back(sp->toolChainAbi); @@ -653,25 +653,25 @@ void fillParameters(DebuggerStartParameters *sp, const Profile *profile /* = 0 * abis = Abi::abisOfBinary(Utils::FileName::fromString(sp->executable)); } if (!abis.isEmpty()) { - AbiProfileMatcher matcher(abis); - profile = ProfileManager::instance()->find(&matcher); - if (!profile) { - CompatibleAbiProfileMatcher matcher(abis); - profile = ProfileManager::instance()->find(&matcher); + AbiKitMatcher matcher(abis); + kit = KitManager::instance()->find(&matcher); + if (!kit) { + CompatibleAbiKitMatcher matcher(abis); + kit = KitManager::instance()->find(&matcher); } } - if (!profile) - profile = ProfileManager::instance()->defaultProfile(); + if (!kit) + kit = KitManager::instance()->defaultKit(); } - sp->sysRoot = SysRootProfileInformation::sysRoot(profile).toString(); - sp->debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString(); + sp->sysRoot = SysRootKitInformation::sysRoot(kit).toString(); + sp->debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString(); - ToolChain *tc = ToolChainProfileInformation::toolChain(profile); + ToolChain *tc = ToolChainKitInformation::toolChain(kit); if (tc) sp->toolChainAbi = tc->targetAbi(); - IDevice::ConstPtr device = DeviceProfileInformation::device(profile); + IDevice::ConstPtr device = DeviceKitInformation::device(kit); if (device) { sp->connParams = device->sshParameters(); sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port); @@ -1388,14 +1388,14 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, { const QString &option = *it; // '-debug <pid>' - // '-debug <exe>[,server=<server:port>][,core=<core>][,profile=<profile>]' + // '-debug <exe>[,server=<server:port>][,core=<core>][,kit=<kit>]' if (*it == _("-debug")) { ++it; if (it == cend) { *errorMessage = msgParameterMissing(*it); return false; } - Profile *profile = 0; + Kit *kit = 0; DebuggerStartParameters sp; qulonglong pid = it->toULongLong(); if (pid) { @@ -1433,12 +1433,12 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, sp.displayName = tr("Core file \"%1\"").arg(sp.coreFile); sp.startMessage = tr("Attaching to core file %1.").arg(sp.coreFile); } - else if (key == QLatin1String("profile")) { - profile = ProfileManager::instance()->find(Id(val)); + else if (key == QLatin1String("kit")) { + kit = KitManager::instance()->find(Id(val)); } } } - fillParameters(&sp, profile); + fillParameters(&sp, kit); if (sp.startMode == StartExternal) { sp.displayName = tr("Executable file \"%1\"").arg(sp.executable); sp.startMessage = tr("Debugging file %1.").arg(sp.executable); @@ -1458,7 +1458,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, return false; } DebuggerStartParameters sp; - fillParameters(&sp, CdbMatcher::findUniversalCdbProfile()); + fillParameters(&sp, CdbMatcher::findUniversalCdbKit()); sp.startMode = AttachCrashedExternal; sp.crashParameter = it->section(QLatin1Char(':'), 0, 0); sp.attachPID = it->section(QLatin1Char(':'), 1, 1).toULongLong(); @@ -1579,7 +1579,7 @@ void DebuggerPluginPrivate::attachCore() { AttachCoreDialog dlg(mainWindow()); - dlg.setProfileId(Id(configValue(_("LastExternalProfile")).toString())); + dlg.setKitId(Id(configValue(_("LastExternalProfile")).toString())); dlg.setLocalExecutableFile(configValue(_("LastExternalExecutableFile")).toString()); dlg.setLocalCoreFile(configValue(_("LastLocalCoreFile")).toString()); dlg.setRemoteCoreFile(configValue(_("LastRemoteCoreFile")).toString()); @@ -1591,12 +1591,12 @@ void DebuggerPluginPrivate::attachCore() setConfigValue(_("LastExternalExecutableFile"), dlg.localExecutableFile()); setConfigValue(_("LastLocalCoreFile"), dlg.localCoreFile()); setConfigValue(_("LastRemoteCoreFile"), dlg.remoteCoreFile()); - setConfigValue(_("LastExternalProfile"), dlg.profile()->id().toString()); + setConfigValue(_("LastExternalProfile"), dlg.kit()->id().toString()); setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript()); DebuggerStartParameters sp; QString display = dlg.isLocal() ? dlg.localCoreFile() : dlg.remoteCoreFile(); - fillParameters(&sp, dlg.profile()); + fillParameters(&sp, dlg.kit()); sp.masterEngineType = GdbEngineType; sp.executable = dlg.localExecutableFile(); sp.coreFile = dlg.localCoreFile(); @@ -1611,9 +1611,9 @@ void DebuggerPluginPrivate::startRemoteCdbSession() { const QString connectionKey = _("CdbRemoteConnection"); DebuggerStartParameters sp; - Profile *profile = CdbMatcher::findUniversalCdbProfile(); - QTC_ASSERT(profile, return); - fillParameters(&sp, profile); + Kit *kit = CdbMatcher::findUniversalCdbKit(); + QTC_ASSERT(kit, return); + fillParameters(&sp, kit); sp.startMode = AttachToRemoteServer; sp.closeMode = KillAtClose; StartRemoteCdbDialog dlg(mainWindow()); @@ -1660,10 +1660,10 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly) } dlg->setAttribute(Qt::WA_DeleteOnClose); - ProfileChooser *profileChooser = dlg->profileChooser(); - Profile *profile = profileChooser->currentProfile(); - QTC_ASSERT(profile, return); - IDevice::ConstPtr device = DeviceProfileInformation::device(profile); + KitChooser *kitChooser = dlg->kitChooser(); + Kit *kit = kitChooser->currentKit(); + QTC_ASSERT(kit, return); + IDevice::ConstPtr device = DeviceKitInformation::device(kit); QTC_ASSERT(device, return); DeviceProcess process = dlg->currentProcess(); if (process.pid == 0) { @@ -1683,7 +1683,7 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly) if (device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { DebuggerStartParameters sp; - fillParameters(&sp, profile); + fillParameters(&sp, kit); sp.attachPID = process.pid; sp.displayName = tr("Process %1").arg(process.pid); sp.executable = process.exe; @@ -1704,11 +1704,11 @@ void DebuggerPluginPrivate::attachExternalApplication(ProjectExplorer::RunContro sp.startMode = AttachExternal; sp.closeMode = DetachAtClose; sp.toolChainAbi = rc->abi(); - Profile *profile = 0; + Kit *kit = 0; if (const RunConfiguration *runConfiguration = rc->runConfiguration()) if (const Target *target = runConfiguration->target()) - profile = target->profile(); - fillParameters(&sp, profile); + kit = target->kit(); + fillParameters(&sp, kit); DebuggerRunControlFactory::createAndScheduleRun(sp); } @@ -1723,19 +1723,19 @@ void DebuggerPluginPrivate::attachToQmlPort() else dlg.setPort(sp.qmlServerPort); - const QVariant profileId = configValue(_("LastProfile")); - if (profileId.isValid()) - dlg.setProfileId(Id(profileId.toString())); + const QVariant kitId = configValue(_("LastProfile")); + if (kitId.isValid()) + dlg.setKitId(Id(kitId.toString())); if (dlg.exec() != QDialog::Accepted) return; - Profile *profile = dlg.profile(); - QTC_ASSERT(profile, return); + Kit *kit = dlg.kit(); + QTC_ASSERT(kit, return); setConfigValue(_("LastQmlServerPort"), dlg.port()); - setConfigValue(_("LastProfile"), profile->id().toString()); + setConfigValue(_("LastProfile"), kit->id().toString()); - fillParameters(&sp, profile); + fillParameters(&sp, kit); sp.qmlServerAddress = sp.connParams.host; sp.qmlServerPort = dlg.port(); sp.startMode = AttachToRemoteProcess; @@ -3369,7 +3369,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess mstart->addSeparator(globalcontext, Constants::G_GENERAL); mstart->addSeparator(globalcontext, Constants::G_SPECIAL); - ProfileManager::instance()->registerProfileInformation(new DebuggerProfileInformation); + KitManager::instance()->registerKitInformation(new DebuggerKitInformation); return theDebuggerCore->initialize(arguments, errorMessage); } @@ -3463,12 +3463,12 @@ static Target *activeTarget() return project->activeTarget(); } -static Profile *currentProfile() +static Kit *currentKit() { Target *t = activeTarget(); if (!t || !t->isEnabled()) return 0; - return activeTarget()->profile(); + return activeTarget()->kit(); } static LocalApplicationRunConfiguration *activeLocalRunConfiguration() @@ -3516,7 +3516,7 @@ void DebuggerPluginPrivate::testPythonDumpers1() void DebuggerPluginPrivate::testPythonDumpers2() { DebuggerStartParameters sp; - fillParameters(&sp, currentProfile()); + fillParameters(&sp, currentKit()); sp.executable = activeLocalRunConfiguration()->executable(); testRunProject(sp, TestCallBack(this, "testPythonDumpers3")); } @@ -3548,7 +3548,7 @@ void DebuggerPluginPrivate::testStateMachine1() void DebuggerPluginPrivate::testStateMachine2() { DebuggerStartParameters sp; - fillParameters(&sp, currentProfile()); + fillParameters(&sp, currentKit()); sp.executable = activeLocalRunConfiguration()->executable(); sp.testCase = TestNoBoundsOfCurrentFunction; testRunProject(sp, TestCallBack(this, "testStateMachine3")); diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 69a084b3e5..85d96b9f50 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -39,7 +39,7 @@ #include "debuggerplugin.h" #include "debuggerstringutils.h" #include "debuggerstartparameters.h" -#include "debuggerprofileinformation.h" +#include "debuggerkitinformation.h" #include "lldb/lldbenginehost.h" #include "debuggertooltipmanager.h" @@ -485,8 +485,8 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu QTC_ASSERT(rc, return sp); Target *target = runConfiguration->target(); - Profile *profile = target ? target->profile() : ProfileManager::instance()->defaultProfile(); - fillParameters(&sp, profile); + Kit *kit = target ? target->kit() : KitManager::instance()->defaultKit(); + fillParameters(&sp, kit); sp.environment = rc->environment(); sp.workingDirectory = rc->workingDirectory(); @@ -624,7 +624,7 @@ static void fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc) if (rc) { DebuggerRunConfigurationAspect *aspect = rc->debuggerAspect(); if (const Target *target = rc->target()) - fillParameters(&sp, target->profile()); + fillParameters(&sp, target->kit()); const bool useCppDebugger = aspect->useCppDebugger(); const bool useQmlDebugger = aspect->useQmlDebugger(); if (useQmlDebugger) { diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index acb28354db..09e0a4f554 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -38,7 +38,7 @@ #include <ssh/sshconnection.h> #include <utils/environment.h> #include <projectexplorer/abi.h> -#include <projectexplorer/profile.h> +#include <projectexplorer/kit.h> #include <projectexplorer/projectexplorerconstants.h> #include <QMetaType> @@ -140,7 +140,7 @@ public: namespace Internal { -void fillParameters(DebuggerStartParameters *sp, const ProjectExplorer::Profile *profile = 0); +void fillParameters(DebuggerStartParameters *sp, const ProjectExplorer::Kit *kit = 0); } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/gdb/startgdbserverdialog.cpp b/src/plugins/debugger/gdb/startgdbserverdialog.cpp index dbeaea6dc2..20a08293ce 100644 --- a/src/plugins/debugger/gdb/startgdbserverdialog.cpp +++ b/src/plugins/debugger/gdb/startgdbserverdialog.cpp @@ -33,14 +33,14 @@ #include "debuggercore.h" #include "debuggermainwindow.h" #include "debuggerplugin.h" -#include "debuggerprofileinformation.h" +#include "debuggerkitinformation.h" #include "debuggerrunner.h" #include "debuggerruncontrolfactory.h" #include "debuggerstartparameters.h" #include <coreplugin/icore.h> #include <extensionsystem/pluginmanager.h> -#include <projectexplorer/profilechooser.h> +#include <projectexplorer/kitchooser.h> #include <projectexplorer/devicesupport/deviceprocesslist.h> #include <projectexplorer/devicesupport/deviceusedportsgatherer.h> #include <ssh/sshconnection.h> @@ -69,7 +69,7 @@ public: DeviceProcessesDialog *dialog; bool startServerOnly; DeviceProcess process; - Profile *profile; + Kit *kit; IDevice::ConstPtr device; DeviceUsedPortsGatherer gatherer; @@ -81,9 +81,9 @@ GdbServerStarter::GdbServerStarter(DeviceProcessesDialog *dlg, bool startServerO { d = new StartGdbServerDialogPrivate; d->dialog = dlg; - d->profile = dlg->profileChooser()->currentProfile(); + d->kit = dlg->kitChooser()->currentKit(); d->process = dlg->currentProcess(); - d->device = DeviceProfileInformation::device(d->profile); + d->device = DeviceKitInformation::device(d->kit); d->startServerOnly = startServerOnly; } @@ -169,7 +169,7 @@ void GdbServerStarter::handleProcessErrorOutput() void GdbServerStarter::attach(int port) { - QString sysroot = SysRootProfileInformation::sysRoot(d->profile).toString(); + QString sysroot = SysRootKitInformation::sysRoot(d->kit).toString(); QString binary; QString localExecutable; QString candidate = sysroot + d->process.exe; @@ -207,7 +207,7 @@ void GdbServerStarter::attach(int port) } DebuggerStartParameters sp; - fillParameters(&sp, d->profile); + fillParameters(&sp, d->kit); sp.masterEngineType = GdbEngineType; sp.connParams.port = port; sp.displayName = tr("Remote: \"%1:%2\"").arg(sp.connParams.host).arg(port); diff --git a/src/plugins/debugger/gdb/startgdbserverdialog.h b/src/plugins/debugger/gdb/startgdbserverdialog.h index 285848996e..e8f019241d 100644 --- a/src/plugins/debugger/gdb/startgdbserverdialog.h +++ b/src/plugins/debugger/gdb/startgdbserverdialog.h @@ -32,7 +32,7 @@ #define STARTGDBSERVERDIALOG_H #include "debugger_global.h" -#include <projectexplorer/profile.h> +#include <projectexplorer/kit.h> #include <projectexplorer/devicesupport/deviceprocessesdialog.h> namespace Debugger { diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp index 374025cd07..aee1ce75db 100644 --- a/src/plugins/debugger/loadcoredialog.cpp +++ b/src/plugins/debugger/loadcoredialog.cpp @@ -36,8 +36,8 @@ #include <coreplugin/icore.h> #include <projectexplorer/abi.h> -#include <projectexplorer/profilechooser.h> -#include <projectexplorer/profileinformation.h> +#include <projectexplorer/kitchooser.h> +#include <projectexplorer/kitinformation.h> #include <ssh/sshconnection.h> #include <ssh/sshremoteprocessrunner.h> #include <ssh/sftpdefs.h> @@ -93,7 +93,7 @@ class SelectRemoteFileDialog : public QDialog public: explicit SelectRemoteFileDialog(QWidget *parent); - void attachToDevice(Profile *profile); + void attachToDevice(Kit *k); QString localFile() const { return m_localFile; } QString remoteFile() const { return m_remoteFile; } @@ -151,11 +151,11 @@ SelectRemoteFileDialog::SelectRemoteFileDialog(QWidget *parent) SLOT(handleConnectionError(QString))); } -void SelectRemoteFileDialog::attachToDevice(Profile *profile) +void SelectRemoteFileDialog::attachToDevice(Kit *k) { m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); - QTC_ASSERT(profile, return); - IDevice::ConstPtr device = DeviceProfileInformation::device(profile); + QTC_ASSERT(k, return); + IDevice::ConstPtr device = DeviceKitInformation::device(k); QTC_ASSERT(device, return); QSsh::SshConnectionParameters sshParams = device->sshParameters(); m_fileSystemModel.setSshConnection(sshParams); @@ -223,7 +223,7 @@ void SelectRemoteFileDialog::selectFile() class AttachCoreDialogPrivate { public: - ProfileChooser *profileChooser; + KitChooser *kitChooser; QSettings *settings; @@ -245,7 +245,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent) d->settings = ICore::settings(); - d->profileChooser = new ProfileChooser(this); + d->kitChooser = new KitChooser(this); d->selectRemoteCoreButton = new QPushButton(tr("Browse..."), this); d->remoteCoreFileName = new QLineEdit(this); @@ -277,7 +277,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent) formLayout->setContentsMargins(0, 0, 0, 0); formLayout->setHorizontalSpacing(6); formLayout->setVerticalSpacing(6); - formLayout->addRow(tr("Target:"), d->profileChooser); + formLayout->addRow(tr("Kit:"), d->kitChooser); formLayout->addRow(tr("&Executable:"), d->localExecFileName); formLayout->addRow(tr("Core file:"), coreLayout); formLayout->addRow(tr("Override &start script:"), d->overrideStartScriptFileName); @@ -296,7 +296,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent) connect(d->selectRemoteCoreButton, SIGNAL(clicked()), SLOT(selectRemoteCoreFile())); connect(d->remoteCoreFileName, SIGNAL(textChanged(QString)), SLOT(changed())); - connect(d->profileChooser, SIGNAL(activated(int)), SLOT(changed())); + connect(d->kitChooser, SIGNAL(activated(int)), SLOT(changed())); connect(d->buttonBox, SIGNAL(rejected()), SLOT(reject())); connect(d->buttonBox, SIGNAL(accepted()), SLOT(accept())); } @@ -308,19 +308,19 @@ AttachCoreDialog::~AttachCoreDialog() bool AttachCoreDialog::isLocal() const { - Profile *profile = d->profileChooser->currentProfile(); - QTC_ASSERT(profile, return false); - IDevice::ConstPtr device = DeviceProfileInformation::device(profile); + Kit *k = d->kitChooser->currentKit(); + QTC_ASSERT(k, return false); + IDevice::ConstPtr device = DeviceKitInformation::device(k); QTC_ASSERT(device, return false); SshConnectionParameters sshParams = device->sshParameters(); d->settings->setValue(QLatin1String("LastProfile"), - d->profileChooser->currentProfileId().toString()); + d->kitChooser->currentKitId().toString()); return sshParams.host.isEmpty(); } void AttachCoreDialog::changed() { - bool isValid = d->profileChooser->currentIndex() >= 0 + bool isValid = d->kitChooser->currentIndex() >= 0 && !localCoreFile().isEmpty(); d->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid); @@ -341,7 +341,7 @@ void AttachCoreDialog::selectRemoteCoreFile() QTC_ASSERT(!isLocal(), return); SelectRemoteFileDialog dlg(this); dlg.setWindowTitle(tr("Select Remote Core File")); - dlg.attachToDevice(d->profileChooser->currentProfile()); + dlg.attachToDevice(d->kitChooser->currentKit()); if (dlg.exec() == QDialog::Rejected) return; d->localCoreFileName->setPath(dlg.localFile()); @@ -379,15 +379,15 @@ QString AttachCoreDialog::remoteCoreFile() const return d->remoteCoreFileName->text(); } -void AttachCoreDialog::setProfileId(const Core::Id &id) +void AttachCoreDialog::setKitId(const Core::Id &id) { - d->profileChooser->setCurrentProfileId(id); + d->kitChooser->setCurrentKitId(id); changed(); } -Profile *AttachCoreDialog::profile() const +Kit *AttachCoreDialog::kit() const { - return d->profileChooser->currentProfile(); + return d->kitChooser->currentKit(); } QString AttachCoreDialog::overrideStartScript() const diff --git a/src/plugins/debugger/loadcoredialog.h b/src/plugins/debugger/loadcoredialog.h index 34cc05bc01..3efcfe4cea 100644 --- a/src/plugins/debugger/loadcoredialog.h +++ b/src/plugins/debugger/loadcoredialog.h @@ -34,7 +34,7 @@ #include <QDialog> namespace Core { class Id; } -namespace ProjectExplorer { class Profile; } +namespace ProjectExplorer { class Kit; } namespace Debugger { namespace Internal { @@ -56,12 +56,12 @@ public: bool isLocal() const; // For persistance. - ProjectExplorer::Profile *profile() const; + ProjectExplorer::Kit *kit() const; void setLocalExecutableFile(const QString &executable); void setLocalCoreFile(const QString &core); void setRemoteCoreFile(const QString &core); void setOverrideStartScript(const QString &scriptName); - void setProfileId(const Core::Id &id); + void setKitId(const Core::Id &id); private slots: void changed(); |