Commit f1f1f65f authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk
Browse files

Kits: Simplify handling of sticky kit information



Change-Id: Iff01445d1251487bd44c227de36f1b47ba4c3d42
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 6e11e562
...@@ -51,11 +51,9 @@ using namespace Utils; ...@@ -51,11 +51,9 @@ using namespace Utils;
namespace Android { namespace Android {
namespace Internal { namespace Internal {
static const char ANDROID_GDBSERVER_INFORMATION[] = "Android.GdbServer.Information";
AndroidGdbServerKitInformation::AndroidGdbServerKitInformation() AndroidGdbServerKitInformation::AndroidGdbServerKitInformation()
{ {
setDataId(ANDROID_GDBSERVER_INFORMATION); setId(AndroidGdbServerKitInformation::id());
setPriority(27999); // Just one less than Debugger! setPriority(27999); // Just one less than Debugger!
} }
...@@ -77,7 +75,12 @@ KitInformation::ItemList AndroidGdbServerKitInformation::toUserOutput(const Kit ...@@ -77,7 +75,12 @@ KitInformation::ItemList AndroidGdbServerKitInformation::toUserOutput(const Kit
KitConfigWidget *AndroidGdbServerKitInformation::createConfigWidget(Kit *kit) const KitConfigWidget *AndroidGdbServerKitInformation::createConfigWidget(Kit *kit) const
{ {
return new AndroidGdbServerKitInformationWidget(kit, isSticky(kit)); return new AndroidGdbServerKitInformationWidget(kit, this);
}
Core::Id AndroidGdbServerKitInformation::id()
{
return "Android.GdbServer.Information";
} }
bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit) bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit)
...@@ -93,12 +96,12 @@ bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit) ...@@ -93,12 +96,12 @@ bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit)
FileName AndroidGdbServerKitInformation::gdbServer(const Kit *kit) FileName AndroidGdbServerKitInformation::gdbServer(const Kit *kit)
{ {
return FileName::fromString(kit->value(ANDROID_GDBSERVER_INFORMATION).toString()); return FileName::fromString(kit->value(AndroidGdbServerKitInformation::id()).toString());
} }
void AndroidGdbServerKitInformation::setGdbSever(Kit *kit, const FileName &gdbServerCommand) void AndroidGdbServerKitInformation::setGdbSever(Kit *kit, const FileName &gdbServerCommand)
{ {
kit->setValue(ANDROID_GDBSERVER_INFORMATION, gdbServerCommand.toString()); kit->setValue(AndroidGdbServerKitInformation::id(), gdbServerCommand.toString());
} }
FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit) FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
...@@ -110,18 +113,13 @@ FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit) ...@@ -110,18 +113,13 @@ FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
return atc->suggestedGdbServer(); return atc->suggestedGdbServer();
} }
void AndroidGdbServerKitInformation::setSticky(Kit *k, bool b)
{
k->setSticky(ANDROID_GDBSERVER_INFORMATION, b);
}
/////////////// ///////////////
// AndroidGdbServerKitInformationWidget // AndroidGdbServerKitInformationWidget
/////////////// ///////////////
AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(Kit *kit, bool sticky) AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(Kit *kit, const KitInformation *ki)
: KitConfigWidget(kit, sticky), : KitConfigWidget(kit, ki),
m_label(new ElidingLabel), m_label(new ElidingLabel),
m_button(new QPushButton(tr("Manage..."))) m_button(new QPushButton(tr("Manage...")))
{ {
......
...@@ -45,7 +45,8 @@ class AndroidGdbServerKitInformationWidget : public ProjectExplorer::KitConfigWi ...@@ -45,7 +45,8 @@ class AndroidGdbServerKitInformationWidget : public ProjectExplorer::KitConfigWi
{ {
Q_OBJECT Q_OBJECT
public: public:
AndroidGdbServerKitInformationWidget(ProjectExplorer::Kit *kit, bool sticky); AndroidGdbServerKitInformationWidget(ProjectExplorer::Kit *kit,
const ProjectExplorer::KitInformation *ki);
QString displayName() const; QString displayName() const;
QString toolTip() const; QString toolTip() const;
...@@ -78,11 +79,11 @@ public: ...@@ -78,11 +79,11 @@ public:
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *) const; ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *) const;
static Core::Id id();
static bool isAndroidKit(const ProjectExplorer::Kit *kit); static bool isAndroidKit(const ProjectExplorer::Kit *kit);
static Utils::FileName gdbServer(const ProjectExplorer::Kit *kit); static Utils::FileName gdbServer(const ProjectExplorer::Kit *kit);
static void setGdbSever(ProjectExplorer::Kit *kit, const Utils::FileName &gdbServerCommand); static void setGdbSever(ProjectExplorer::Kit *kit, const Utils::FileName &gdbServerCommand);
static Utils::FileName autoDetect(ProjectExplorer::Kit *kit); static Utils::FileName autoDetect(ProjectExplorer::Kit *kit);
static void setSticky(ProjectExplorer::Kit *k, bool b);
}; };
} // namespace Internal } // namespace Internal
......
...@@ -77,9 +77,6 @@ static const char DEFAULT_DEBUGGER_PATH_KEY[] = "DefaultDebugger.Path."; ...@@ -77,9 +77,6 @@ static const char DEFAULT_DEBUGGER_PATH_KEY[] = "DefaultDebugger.Path.";
static const char DEBUGGER_FILENAME[] = "/qtcreator/debuggers.xml"; static const char DEBUGGER_FILENAME[] = "/qtcreator/debuggers.xml";
static const char DEBUGGER_LEGACY_FILENAME[] = "/qtcreator/profiles.xml"; static const char DEBUGGER_LEGACY_FILENAME[] = "/qtcreator/profiles.xml";
static const char DEBUGGER_INFORMATION_LEGACY[] = "Debugger.Information";
//static const char DEBUGGER_INFORMATION[] = "Debugger.InformationV3";
static const char DEBUGGER_INFORMATION[] = "Debugger.Information";
static const char DEBUGGER_INFORMATION_COMMAND[] = "Binary"; static const char DEBUGGER_INFORMATION_COMMAND[] = "Binary";
static const char DEBUGGER_INFORMATION_DISPLAYNAME[] = "DisplayName"; static const char DEBUGGER_INFORMATION_DISPLAYNAME[] = "DisplayName";
static const char DEBUGGER_INFORMATION_ID[] = "Id"; static const char DEBUGGER_INFORMATION_ID[] = "Id";
...@@ -224,7 +221,7 @@ void DebuggerItem::reinitializeFromFile() ...@@ -224,7 +221,7 @@ void DebuggerItem::reinitializeFromFile()
DebuggerKitInformation::DebuggerKitInformation() DebuggerKitInformation::DebuggerKitInformation()
{ {
setObjectName(QLatin1String("DebuggerKitInformation")); setObjectName(QLatin1String("DebuggerKitInformation"));
setDataId(DEBUGGER_INFORMATION); setId(DebuggerKitInformation::id());
setPriority(28000); setPriority(28000);
} }
...@@ -242,7 +239,7 @@ QVariant DebuggerKitInformation::defaultValue(Kit *k) const ...@@ -242,7 +239,7 @@ QVariant DebuggerKitInformation::defaultValue(Kit *k) const
void DebuggerKitInformation::setup(Kit *k) void DebuggerKitInformation::setup(Kit *k)
{ {
k->setValue(DEBUGGER_INFORMATION, defaultValue(k)); k->setValue(DebuggerKitInformation::id(), defaultValue(k));
} }
// Check the configuration errors and return a flag mask. Provide a quick check and // Check the configuration errors and return a flag mask. Provide a quick check and
...@@ -258,7 +255,7 @@ enum DebuggerConfigurationErrors { ...@@ -258,7 +255,7 @@ enum DebuggerConfigurationErrors {
static QVariant debuggerPathOrId(const Kit *k) static QVariant debuggerPathOrId(const Kit *k)
{ {
QTC_ASSERT(k, return QString()); QTC_ASSERT(k, return QString());
QVariant id = k->value(DEBUGGER_INFORMATION); QVariant id = k->value(DebuggerKitInformation::id());
if (!id.isValid()) if (!id.isValid())
return id; // Invalid. return id; // Invalid.
...@@ -344,7 +341,7 @@ QList<Task> DebuggerKitInformation::validateDebugger(const Kit *k) ...@@ -344,7 +341,7 @@ QList<Task> DebuggerKitInformation::validateDebugger(const Kit *k)
KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const
{ {
return new Internal::DebuggerKitConfigWidget(k, isSticky(k)); return new Internal::DebuggerKitConfigWidget(k, this);
} }
KitInformation::ItemList DebuggerKitInformation::toUserOutput(const Kit *k) const KitInformation::ItemList DebuggerKitInformation::toUserOutput(const Kit *k) const
...@@ -382,12 +379,11 @@ void DebuggerKitInformation::setDebugger(Kit *k, ...@@ -382,12 +379,11 @@ void DebuggerKitInformation::setDebugger(Kit *k,
theDebuggerItemManager()->setDebugger(k, type, command); theDebuggerItemManager()->setDebugger(k, type, command);
} }
void DebuggerKitInformation::setSticky(Kit *k, bool b) Core::Id DebuggerKitInformation::id()
{ {
k->setSticky(DEBUGGER_INFORMATION, b); return "Debugger.Information";
} }
namespace Internal { namespace Internal {
static FileName userSettingsFileName() static FileName userSettingsFileName()
...@@ -590,7 +586,7 @@ void DebuggerItemManager::readLegacyDebuggers() ...@@ -590,7 +586,7 @@ void DebuggerItemManager::readLegacyDebuggers()
QVariantMap data1 = v.toMap(); QVariantMap data1 = v.toMap();
QString kitName = data1.value(QLatin1String("PE.Profile.Name")).toString(); QString kitName = data1.value(QLatin1String("PE.Profile.Name")).toString();
QVariantMap data2 = data1.value(QLatin1String("PE.Profile.Data")).toMap(); QVariantMap data2 = data1.value(QLatin1String("PE.Profile.Data")).toMap();
QVariant v3 = data2.value(QLatin1String(DEBUGGER_INFORMATION)); QVariant v3 = data2.value(DebuggerKitInformation::id().toString());
QString fn; QString fn;
if (v3.type() == QVariant::String) if (v3.type() == QVariant::String)
fn = v3.toString(); fn = v3.toString();
...@@ -838,8 +834,7 @@ void DebuggerItemManager::setDebugger(Kit *kit, Debugger::DebuggerEngineType typ ...@@ -838,8 +834,7 @@ void DebuggerItemManager::setDebugger(Kit *kit, Debugger::DebuggerEngineType typ
const DebuggerItem *it = findByCommand(command); const DebuggerItem *it = findByCommand(command);
QTC_ASSERT(it, return); QTC_ASSERT(it, return);
QTC_ASSERT(it->id.isValid(), return); QTC_ASSERT(it->id.isValid(), return);
kit->setValue(DEBUGGER_INFORMATION, it->id); kit->setValue(DebuggerKitInformation::id(), it->id);
} }
QModelIndex DebuggerItemManager::currentIndex() const QModelIndex DebuggerItemManager::currentIndex() const
...@@ -1004,8 +999,8 @@ QVariant DebuggerItemManager::defaultDebugger(ToolChain *tc) ...@@ -1004,8 +999,8 @@ QVariant DebuggerItemManager::defaultDebugger(ToolChain *tc)
// DebuggerKitConfigWidget // DebuggerKitConfigWidget
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
DebuggerKitConfigWidget::DebuggerKitConfigWidget(Kit *workingCopy, bool sticky) DebuggerKitConfigWidget::DebuggerKitConfigWidget(Kit *workingCopy, const KitInformation *ki)
: KitConfigWidget(workingCopy, sticky) : KitConfigWidget(workingCopy, ki)
{ {
DebuggerItemManager *manager = theDebuggerItemManager(); DebuggerItemManager *manager = theDebuggerItemManager();
QTC_CHECK(manager); QTC_CHECK(manager);
...@@ -1072,7 +1067,7 @@ void DebuggerKitConfigWidget::manageDebuggers() ...@@ -1072,7 +1067,7 @@ void DebuggerKitConfigWidget::manageDebuggers()
void DebuggerKitConfigWidget::currentDebuggerChanged(int) void DebuggerKitConfigWidget::currentDebuggerChanged(int)
{ {
m_kit->setValue(DEBUGGER_INFORMATION, m_comboBox->itemData(m_comboBox->currentIndex())); m_kit->setValue(DebuggerKitInformation::id(), m_comboBox->itemData(m_comboBox->currentIndex()));
} }
void DebuggerKitConfigWidget::onDebuggerAdded(const QVariant &id, const QString &displayName) void DebuggerKitConfigWidget::onDebuggerAdded(const QVariant &id, const QString &displayName)
......
...@@ -127,7 +127,8 @@ class DebuggerKitConfigWidget : public ProjectExplorer::KitConfigWidget ...@@ -127,7 +127,8 @@ class DebuggerKitConfigWidget : public ProjectExplorer::KitConfigWidget
Q_OBJECT Q_OBJECT
public: public:
DebuggerKitConfigWidget(ProjectExplorer::Kit *workingCopy, bool sticky); DebuggerKitConfigWidget(ProjectExplorer::Kit *workingCopy,
const ProjectExplorer::KitInformation *ki);
QString displayName() const; QString displayName() const;
QString toolTip() const; QString toolTip() const;
......
...@@ -62,11 +62,10 @@ public: ...@@ -62,11 +62,10 @@ public:
static void setDebugger(ProjectExplorer::Kit *k, static void setDebugger(ProjectExplorer::Kit *k,
DebuggerEngineType type, const Utils::FileName &command); DebuggerEngineType type, const Utils::FileName &command);
static Core::Id id();
static Utils::FileName debuggerCommand(const ProjectExplorer::Kit *k); static Utils::FileName debuggerCommand(const ProjectExplorer::Kit *k);
static DebuggerEngineType engineType(const ProjectExplorer::Kit *k); static DebuggerEngineType engineType(const ProjectExplorer::Kit *k);
static QString displayString(const ProjectExplorer::Kit *k); static QString displayString(const ProjectExplorer::Kit *k);
static void setSticky(ProjectExplorer::Kit *k, bool b);
}; };
} // namespace Debugger } // namespace Debugger
......
...@@ -107,7 +107,7 @@ Kit::Kit(Core::Id id) : ...@@ -107,7 +107,7 @@ Kit::Kit(Core::Id id) :
{ {
KitGuard g(this); KitGuard g(this);
foreach (KitInformation *sti, KitManager::kitInformation()) foreach (KitInformation *sti, KitManager::kitInformation())
setValue(sti->dataId(), sti->defaultValue(this)); setValue(sti->id(), sti->defaultValue(this));
setDisplayName(QCoreApplication::translate("ProjectExplorer::Kit", "Unnamed")); setDisplayName(QCoreApplication::translate("ProjectExplorer::Kit", "Unnamed"));
setIconPath(Utils::FileName::fromString(QLatin1String(":///DESKTOP///"))); setIconPath(Utils::FileName::fromString(QLatin1String(":///DESKTOP///")));
...@@ -471,8 +471,8 @@ void Kit::setSdkProvided(bool sdkProvided) ...@@ -471,8 +471,8 @@ void Kit::setSdkProvided(bool sdkProvided)
void Kit::makeSticky() void Kit::makeSticky()
{ {
foreach (KitInformation *ki, KitManager::kitInformation()) { foreach (KitInformation *ki, KitManager::kitInformation()) {
if (hasValue(ki->dataId())) if (hasValue(ki->id()))
setSticky(ki->dataId(), true); setSticky(ki->id(), true);
} }
} }
......
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "kitconfigwidget.h"
#include "kit.h"
#include "kitinformation.h"
namespace ProjectExplorer {
KitConfigWidget::KitConfigWidget(Kit *kit, const KitInformation *ki) : m_kit(kit),
m_kitInformation(ki), m_isSticky(kit->isSticky(ki->id()))
{ }
} // namespace ProjectExplorer
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
namespace ProjectExplorer { namespace ProjectExplorer {
class Kit; class Kit;
class KitInformation;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// KitConfigWidget // KitConfigWidget
...@@ -47,7 +48,7 @@ class PROJECTEXPLORER_EXPORT KitConfigWidget : public QObject ...@@ -47,7 +48,7 @@ class PROJECTEXPLORER_EXPORT KitConfigWidget : public QObject
Q_OBJECT Q_OBJECT
public: public:
KitConfigWidget(Kit *kit, bool sticky) : m_kit(kit), m_isSticky(sticky) { } KitConfigWidget(Kit *kit, const KitInformation *ki);
virtual QString displayName() const = 0; virtual QString displayName() const = 0;
virtual QString toolTip() const { return QString(); } virtual QString toolTip() const { return QString(); }
...@@ -58,13 +59,14 @@ public: ...@@ -58,13 +59,14 @@ public:
virtual QWidget *mainWidget() const = 0; virtual QWidget *mainWidget() const = 0;
virtual QWidget *buttonWidget() const { return 0; } virtual QWidget *buttonWidget() const { return 0; }
bool isSticky() { return m_isSticky; } bool isSticky() const { return m_isSticky; }
signals: signals:
void dirty(); void dirty();
protected: protected:
ProjectExplorer::Kit *m_kit; Kit *m_kit;
const KitInformation *m_kitInformation;
bool m_isSticky; bool m_isSticky;
}; };
......
...@@ -49,12 +49,10 @@ namespace ProjectExplorer { ...@@ -49,12 +49,10 @@ namespace ProjectExplorer {
// SysRootInformation: // SysRootInformation:
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static const char SYSROOT_INFORMATION[] = "PE.Profile.SysRoot";
SysRootKitInformation::SysRootKitInformation() SysRootKitInformation::SysRootKitInformation()
{ {
setObjectName(QLatin1String("SysRootInformation")); setObjectName(QLatin1String("SysRootInformation"));
setDataId(SYSROOT_INFORMATION); setId(SysRootKitInformation::id());
setPriority(31000); setPriority(31000);
} }
...@@ -77,7 +75,7 @@ QList<Task> SysRootKitInformation::validate(const Kit *k) const ...@@ -77,7 +75,7 @@ QList<Task> SysRootKitInformation::validate(const Kit *k) const
KitConfigWidget *SysRootKitInformation::createConfigWidget(Kit *k) const KitConfigWidget *SysRootKitInformation::createConfigWidget(Kit *k) const
{ {
return new Internal::SysRootInformationConfigWidget(k, isSticky(k)); return new Internal::SysRootInformationConfigWidget(k, this);
} }
KitInformation::ItemList SysRootKitInformation::toUserOutput(const Kit *k) const KitInformation::ItemList SysRootKitInformation::toUserOutput(const Kit *k) const
...@@ -85,10 +83,15 @@ KitInformation::ItemList SysRootKitInformation::toUserOutput(const Kit *k) const ...@@ -85,10 +83,15 @@ KitInformation::ItemList SysRootKitInformation::toUserOutput(const Kit *k) const
return ItemList() << qMakePair(tr("Sys Root"), sysRoot(k).toUserOutput()); return ItemList() << qMakePair(tr("Sys Root"), sysRoot(k).toUserOutput());
} }
Core::Id SysRootKitInformation::id()
{
return "PE.Profile.SysRoot";
}
bool SysRootKitInformation::hasSysRoot(const Kit *k) bool SysRootKitInformation::hasSysRoot(const Kit *k)
{ {
if (k) if (k)
return !k->value(Core::Id(SYSROOT_INFORMATION)).toString().isEmpty(); return !k->value(SysRootKitInformation::id()).toString().isEmpty();
return false; return false;
} }
...@@ -96,29 +99,22 @@ Utils::FileName SysRootKitInformation::sysRoot(const Kit *k) ...@@ -96,29 +99,22 @@ Utils::FileName SysRootKitInformation::sysRoot(const Kit *k)
{ {
if (!k) if (!k)
return Utils::FileName(); return Utils::FileName();
return Utils::FileName::fromString(k->value(Core::Id(SYSROOT_INFORMATION)).toString()); return Utils::FileName::fromString(k->value(SysRootKitInformation::id()).toString());
} }
void SysRootKitInformation::setSysRoot(Kit *k, const Utils::FileName &v) void SysRootKitInformation::setSysRoot(Kit *k, const Utils::FileName &v)
{ {
k->setValue(Core::Id(SYSROOT_INFORMATION), v.toString()); k->setValue(SysRootKitInformation::id(), v.toString());
}
void SysRootKitInformation::setSticky(Kit *k, bool b)
{
k->setSticky(SYSROOT_INFORMATION, b);
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// ToolChainInformation: // ToolChainInformation:
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static const char TOOLCHAIN_INFORMATION[] = "PE.Profile.ToolChain";
ToolChainKitInformation::ToolChainKitInformation() ToolChainKitInformation::ToolChainKitInformation()
{ {
setObjectName(QLatin1String("ToolChainInformation")); setObjectName(QLatin1String("ToolChainInformation"));
setDataId(TOOLCHAIN_INFORMATION); setId(ToolChainKitInformation::id());
setPriority(30000); setPriority(30000);
connect(KitManager::instance(), SIGNAL(kitsLoaded()), connect(KitManager::instance(), SIGNAL(kitsLoaded()),
...@@ -170,7 +166,7 @@ void ToolChainKitInformation::fix(Kit *k) ...@@ -170,7 +166,7 @@ void ToolChainKitInformation::fix(Kit *k)
void ToolChainKitInformation::setup(Kit *k) void ToolChainKitInformation::setup(Kit *k)
{ {
QTC_ASSERT(ToolChainManager::isLoaded(), return); QTC_ASSERT(ToolChainManager::isLoaded(), return);
const QString id = k->value(TOOLCHAIN_INFORMATION).toString(); const QString id = k->value(ToolChainKitInformation::id()).toString();
if (id.isEmpty()) if (id.isEmpty())
return; return;
...@@ -187,7 +183,7 @@ void ToolChainKitInformation::setup(Kit *k) ...@@ -187,7 +183,7 @@ void ToolChainKitInformation::setup(Kit *k)
KitConfigWidget *ToolChainKitInformation::createConfigWidget(Kit *k) const KitConfigWidget *ToolChainKitInformation::createConfigWidget(Kit *k) const
{ {
return new Internal::ToolChainInformationConfigWidget(k, isSticky(k)); return new Internal::ToolChainInformationConfigWidget(k, this);
} }
QString ToolChainKitInformation::displayNamePostfix(const Kit *k) const QString ToolChainKitInformation::displayNamePostfix(const Kit *k) const
...@@ -217,17 +213,22 @@ IOutputParser *ToolChainKitInformation::createOutputParser(const Kit *k) const ...@@ -217,17 +213,22 @@ IOutputParser *ToolChainKitInformation::createOutputParser(const Kit *k) const
return 0; return 0;
} }
Core::Id ToolChainKitInformation::id()
{
return "PE.Profile.ToolChain";
}
ToolChain *ToolChainKitInformation::toolChain(const Kit *k) ToolChain *ToolChainKitInformation::toolChain(const Kit *k)
{ {
QTC_ASSERT(ToolChainManager::isLoaded(), return 0); QTC_ASSERT(ToolChainManager::isLoaded(), return 0);
if (!k) if (!k)
return 0; return 0;
return ToolChainManager::findToolChain(k->value(TOOLCHAIN_INFORMATION).toString()); return ToolChainManager::findToolChain(k->value(ToolChainKitInformation::id()).toString());
} }