Commit e4b2947c authored by hjk's avatar hjk

ProjectExplorer et al: Code cosmetics

Apply static 'pattern' for ToolChainManager, de-noise using code.

Change-Id: I196dc6f39dc2c61b1783aecad3faa0b23849e00a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent c10ae974
......@@ -739,7 +739,7 @@ void AndroidConfigurations::updateAutomaticKitList()
if (AndroidConfigurations::instance().config().automaticKitCreation) {
// having a empty toolchains list will remove all autodetected kits for android
// exactly what we want in that case
foreach (ToolChain *tc, ToolChainManager::instance()->toolChains()) {
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
if (!tc->isAutoDetected())
continue;
if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
......
......@@ -45,8 +45,11 @@
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtkitinformation.h>
using namespace Android;
using namespace Android::Internal;
using namespace ProjectExplorer;
using namespace Utils;
namespace Android {
namespace Internal {
static const char ANDROID_GDBSERVER_INFORMATION[] = "Android.GdbServer.Information";
......@@ -56,31 +59,31 @@ AndroidGdbServerKitInformation::AndroidGdbServerKitInformation()
setPriority(27999); // Just one less than Debugger!
}
QVariant AndroidGdbServerKitInformation::defaultValue(ProjectExplorer::Kit *kit) const
QVariant AndroidGdbServerKitInformation::defaultValue(Kit *kit) const
{
return autoDetect(kit).toString();
}
QList<ProjectExplorer::Task> AndroidGdbServerKitInformation::validate(const ProjectExplorer::Kit *) const
QList<Task> AndroidGdbServerKitInformation::validate(const Kit *) const
{
return QList<ProjectExplorer::Task>();
return QList<Task>();
}
ProjectExplorer::KitInformation::ItemList AndroidGdbServerKitInformation::toUserOutput(const ProjectExplorer::Kit *kit) const
KitInformation::ItemList AndroidGdbServerKitInformation::toUserOutput(const Kit *kit) const
{
return ProjectExplorer::KitInformation::ItemList()
return KitInformation::ItemList()
<< qMakePair(tr("GDB server"), AndroidGdbServerKitInformation::gdbServer(kit).toUserOutput());
}
ProjectExplorer::KitConfigWidget *AndroidGdbServerKitInformation::createConfigWidget(ProjectExplorer::Kit *kit) const
KitConfigWidget *AndroidGdbServerKitInformation::createConfigWidget(Kit *kit) const
{
return new AndroidGdbServerKitInformationWidget(kit, isSticky(kit));
}
bool AndroidGdbServerKitInformation::isAndroidKit(const ProjectExplorer::Kit *kit)
bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit)
{
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(kit);
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(kit);
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (qt && tc)
return qt->type() == QLatin1String(Android::Constants::ANDROIDQT)
&& tc->type() == QLatin1String(Android::Constants::ANDROID_TOOLCHAIN_TYPE);
......@@ -88,27 +91,26 @@ bool AndroidGdbServerKitInformation::isAndroidKit(const ProjectExplorer::Kit *ki
}
Utils::FileName AndroidGdbServerKitInformation::gdbServer(const ProjectExplorer::Kit *kit)
FileName AndroidGdbServerKitInformation::gdbServer(const Kit *kit)
{
return Utils::FileName::fromString(kit->value(Core::Id(ANDROID_GDBSERVER_INFORMATION)).toString());
return FileName::fromString(kit->value(ANDROID_GDBSERVER_INFORMATION).toString());
}
void AndroidGdbServerKitInformation::setGdbSever(ProjectExplorer::Kit *kit, const Utils::FileName &gdbServerCommand)
void AndroidGdbServerKitInformation::setGdbSever(Kit *kit, const FileName &gdbServerCommand)
{
kit->setValue(Core::Id(ANDROID_GDBSERVER_INFORMATION),
gdbServerCommand.toString());
kit->setValue(ANDROID_GDBSERVER_INFORMATION, gdbServerCommand.toString());
}
Utils::FileName AndroidGdbServerKitInformation::autoDetect(ProjectExplorer::Kit *kit)
FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
{
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(kit);
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
return Utils::FileName();
return FileName();
AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
return atc->suggestedGdbServer();
}
void AndroidGdbServerKitInformation::makeSticky(ProjectExplorer::Kit *k)
void AndroidGdbServerKitInformation::makeSticky(Kit *k)
{
k->makeSticky(ANDROID_GDBSERVER_INFORMATION);
}
......@@ -118,9 +120,9 @@ void AndroidGdbServerKitInformation::makeSticky(ProjectExplorer::Kit *k)
///////////////
AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(ProjectExplorer::Kit *kit, bool sticky)
: ProjectExplorer::KitConfigWidget(kit, sticky),
m_label(new Utils::ElidingLabel),
AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(Kit *kit, bool sticky)
: KitConfigWidget(kit, sticky),
m_label(new ElidingLabel),
m_button(new QPushButton(tr("Manage...")))
{
// ToolButton with Menu, defaulting to 'Autodetect'.
......@@ -156,7 +158,7 @@ void AndroidGdbServerKitInformationWidget::refresh()
bool AndroidGdbServerKitInformationWidget::visibleInKit()
{
return ProjectExplorer::DeviceKitInformation::deviceId(m_kit) == Core::Id(Constants::ANDROID_DEVICE_ID);
return DeviceKitInformation::deviceId(m_kit) == Constants::ANDROID_DEVICE_ID;
}
QWidget *AndroidGdbServerKitInformationWidget::mainWidget() const
......@@ -182,8 +184,8 @@ void AndroidGdbServerKitInformationWidget::showDialog()
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
QLabel *binaryLabel = new QLabel(tr("&Binary:"));
Utils::PathChooser *chooser = new Utils::PathChooser;
chooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
PathChooser *chooser = new PathChooser;
chooser->setExpectedKind(PathChooser::ExistingCommand);
chooser->setPath(AndroidGdbServerKitInformation::gdbServer(m_kit).toString());
binaryLabel->setBuddy(chooser);
formLayout->addRow(binaryLabel, chooser);
......@@ -199,3 +201,6 @@ void AndroidGdbServerKitInformationWidget::showDialog()
if (dialog.exec() == QDialog::Accepted)
AndroidGdbServerKitInformation::setGdbSever(m_kit, chooser->fileName());
}
} // namespace Internal
} // namespace Android
......@@ -33,11 +33,10 @@
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitconfigwidget.h>
QT_FORWARD_DECLARE_CLASS(QLabel);
QT_FORWARD_DECLARE_CLASS(QPushButton);
namespace ProjectExplorer {
}
QT_BEGIN_NAMESPACE
class QLabel;
class QPushButton;
QT_END_NAMESPACE
namespace Android {
namespace Internal {
......
......@@ -36,6 +36,8 @@
#include <QCoreApplication>
using namespace ProjectExplorer;
namespace Android {
namespace Internal {
......@@ -67,9 +69,9 @@ void AndroidSettingsPage::apply()
{
m_widget->saveSettings();
QList<ProjectExplorer::ToolChain *> existingToolChains = ProjectExplorer::ToolChainManager::instance()->toolChains();
QList<ProjectExplorer::ToolChain *> toolchains = AndroidToolChainFactory::createToolChainsForNdk(AndroidConfigurations::instance().config().ndkLocation);
foreach (ProjectExplorer::ToolChain *tc, toolchains) {
QList<ToolChain *> existingToolChains = ToolChainManager::toolChains();
QList<ToolChain *> toolchains = AndroidToolChainFactory::createToolChainsForNdk(AndroidConfigurations::instance().config().ndkLocation);
foreach (ToolChain *tc, toolchains) {
bool found = false;
for (int i = 0; i < existingToolChains.count(); ++i) {
if (*(existingToolChains.at(i)) == *tc) {
......@@ -80,15 +82,13 @@ void AndroidSettingsPage::apply()
if (found)
delete tc;
else
ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc);
ToolChainManager::registerToolChain(tc);
}
for (int i = 0; i < existingToolChains.count(); ++i) {
ProjectExplorer::ToolChain *tc = existingToolChains.at(i);
foreach (ToolChain *tc, existingToolChains) {
if (tc->type() == QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) {
if (!tc->isValid()) {
ProjectExplorer::ToolChainManager::instance()->deregisterToolChain(tc);
}
if (!tc->isValid())
ToolChainManager::deregisterToolChain(tc);
}
}
......
......@@ -246,7 +246,6 @@ QVariant DebuggerKitInformation::defaultValue(Kit *k) const
void DebuggerKitInformation::setup(Kit *k)
{
QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return);
k->setValue(DEBUGGER_INFORMATION, defaultValue(k));
}
......
......@@ -128,11 +128,11 @@ ToolChainKitInformation::ToolChainKitInformation()
QVariant ToolChainKitInformation::defaultValue(Kit *k) const
{
Q_UNUSED(k);
QList<ToolChain *> tcList = ToolChainManager::instance()->toolChains();
QList<ToolChain *> tcList = ToolChainManager::toolChains();
if (tcList.isEmpty())
return QString();
ProjectExplorer::Abi abi = ProjectExplorer::Abi::hostAbi();
Abi abi = Abi::hostAbi();
foreach (ToolChain *tc, tcList) {
if (tc->targetAbi() == abi)
......@@ -158,7 +158,7 @@ QList<Task> ToolChainKitInformation::validate(const Kit *k) const
void ToolChainKitInformation::fix(Kit *k)
{
QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return);
QTC_ASSERT(ToolChainManager::isLoaded(), return);
if (toolChain(k))
return;
......@@ -169,17 +169,17 @@ void ToolChainKitInformation::fix(Kit *k)
void ToolChainKitInformation::setup(Kit *k)
{
QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return);
const QString id = k->value(Core::Id(TOOLCHAIN_INFORMATION)).toString();
QTC_ASSERT(ToolChainManager::isLoaded(), return);
const QString id = k->value(TOOLCHAIN_INFORMATION).toString();
if (id.isEmpty())
return;
ToolChain *tc = ToolChainManager::instance()->findToolChain(id);
ToolChain *tc = ToolChainManager::findToolChain(id);
if (tc)
return;
// ID is not found: Might be an ABI string...
foreach (ToolChain *current, ToolChainManager::instance()->toolChains()) {
foreach (ToolChain *current, ToolChainManager::toolChains()) {
if (current->targetAbi().toString() == id)
return setToolChain(k, current);
}
......@@ -219,16 +219,15 @@ IOutputParser *ToolChainKitInformation::createOutputParser(const Kit *k) const
ToolChain *ToolChainKitInformation::toolChain(const Kit *k)
{
QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return 0);
QTC_ASSERT(ToolChainManager::isLoaded(), return 0);
if (!k)
return 0;
return ToolChainManager::instance()
->findToolChain(k->value(Core::Id(TOOLCHAIN_INFORMATION)).toString());
return ToolChainManager::findToolChain(k->value(TOOLCHAIN_INFORMATION).toString());
}
void ToolChainKitInformation::setToolChain(Kit *k, ToolChain *tc)
{
k->setValue(Core::Id(TOOLCHAIN_INFORMATION), tc ? tc->id() : QString());
k->setValue(TOOLCHAIN_INFORMATION, tc ? tc->id() : QString());
}
QString ToolChainKitInformation::msgNoToolChainInTarget()
......
......@@ -116,13 +116,11 @@ void SysRootInformationConfigWidget::pathWasChanged()
ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, bool sticky) :
KitConfigWidget(k, sticky), m_isReadOnly(false)
{
ToolChainManager *tcm = ToolChainManager::instance();
m_comboBox = new QComboBox;
m_comboBox->setEnabled(false);
m_comboBox->setToolTip(toolTip());
foreach (ToolChain *tc, tcm->toolChains())
foreach (ToolChain *tc, ToolChainManager::toolChains())
toolChainAdded(tc);
updateComboBox();
......@@ -134,6 +132,7 @@ ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, bool
m_manageButton->setContentsMargins(0, 0, 0, 0);
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageToolChains()));
QObject *tcm = ToolChainManager::instance();
connect(tcm, SIGNAL(toolChainAdded(ProjectExplorer::ToolChain*)),
this, SLOT(toolChainAdded(ProjectExplorer::ToolChain*)));
connect(tcm, SIGNAL(toolChainRemoved(ProjectExplorer::ToolChain*)),
......@@ -211,8 +210,7 @@ void ToolChainInformationConfigWidget::manageToolChains()
void ToolChainInformationConfigWidget::currentToolChainChanged(int idx)
{
const QString id = m_comboBox->itemData(idx).toString();
ToolChain *tc = ToolChainManager::instance()->findToolChain(id);
ToolChainKitInformation::setToolChain(m_kit, tc);
ToolChainKitInformation::setToolChain(m_kit, ToolChainManager::findToolChain(id));
}
void ToolChainInformationConfigWidget::updateComboBox()
......
......@@ -1108,7 +1108,7 @@ void ProjectExplorerPlugin::extensionsInitialized()
DeviceManager::instance()->addDevice(IDevice::Ptr(new DesktopDevice));
DeviceManager::instance()->load();
d->m_toolChainManager->restoreToolChains();
ToolChainManager::restoreToolChains();
d->m_kitManager->restoreKits();
}
......
......@@ -131,7 +131,7 @@ QList<Utils::FileName> ToolChain::suggestedMkspecList() const
Utils::FileName ToolChain::suggestedDebugger() const
{
return ToolChainManager::instance()->defaultDebugger(targetAbi());
return ToolChainManager::defaultDebugger(targetAbi());
}
bool ToolChain::canClone() const
......@@ -169,7 +169,7 @@ QVariantMap ToolChain::toMap() const
void ToolChain::toolChainUpdated()
{
ToolChainManager::instance()->notifyAboutUpdate(this);
ToolChainManager::notifyAboutUpdate(this);
}
void ToolChain::setAutoDetected(bool autodetect)
......
......@@ -32,22 +32,18 @@
#include "projectexplorer_export.h"
#include <QList>
#include <QObject>
#include <QString>
namespace Utils { class FileName; }
namespace ProjectExplorer {
class ProjectExplorerPlugin;
class ToolChain;
class ToolChainFactory;
class Abi;
namespace Internal {
class ToolChainManagerPrivate;
}
// --------------------------------------------------------------------------
// ToolChainManager
// --------------------------------------------------------------------------
......@@ -57,21 +53,21 @@ class PROJECTEXPLORER_EXPORT ToolChainManager : public QObject
Q_OBJECT
public:
static ToolChainManager *instance();
static QObject *instance();
~ToolChainManager();
QList<ToolChain *> toolChains() const;
QList<ToolChain *> findToolChains(const Abi &abi) const;
ToolChain *findToolChain(const QString &id) const;
static QList<ToolChain *> toolChains();
static QList<ToolChain *> findToolChains(const Abi &abi);
static ToolChain *findToolChain(const QString &id);
Utils::FileName defaultDebugger(const Abi &abi) const;
static Utils::FileName defaultDebugger(const Abi &abi);
bool isLoaded() const;
static bool isLoaded();
public slots:
bool registerToolChain(ProjectExplorer::ToolChain *tc);
void deregisterToolChain(ProjectExplorer::ToolChain *tc);
static bool registerToolChain(ToolChain *tc);
static void deregisterToolChain(ToolChain *tc);
public slots:
void saveToolChains();
signals:
......@@ -80,9 +76,9 @@ signals:
void toolChainRemoved(ProjectExplorer::ToolChain *);
// Tool chain was updated.
void toolChainUpdated(ProjectExplorer::ToolChain *);
// Something changed:
// Something changed.
void toolChainsChanged();
//
void toolChainsLoaded();
private:
......@@ -90,16 +86,9 @@ private:
// Make sure the this is only called after all
// Tool chain Factories are registered!
void restoreToolChains();
QList<ToolChain *> restoreToolChains(const Utils::FileName &fileName);
void notifyAboutUpdate(ProjectExplorer::ToolChain *);
Internal::ToolChainManagerPrivate *const d;
static ToolChainManager *m_instance;
static void restoreToolChains();
static void notifyAboutUpdate(ToolChain *);
friend class Internal::ToolChainManagerPrivate; // for the restoreToolChains methods
friend class ProjectExplorerPlugin; // for constructor
friend class ToolChain;
};
......
......@@ -106,9 +106,8 @@ ToolChainModel::ToolChainModel(QObject *parent) :
m_autoRoot = new ToolChainNode(m_root);
m_manualRoot = new ToolChainNode(m_root);
foreach (ToolChain *tc, ToolChainManager::instance()->toolChains()) {
foreach (ToolChain *tc, ToolChainManager::toolChains())
addToolChain(tc);
}
}
ToolChainModel::~ToolChainModel()
......@@ -278,7 +277,7 @@ void ToolChainModel::apply()
QList<ToolChainNode *> nodes = m_toRemoveList;
foreach (ToolChainNode *n, nodes) {
Q_ASSERT(!n->parent);
ToolChainManager::instance()->deregisterToolChain(n->toolChain);
ToolChainManager::deregisterToolChain(n->toolChain);
}
Q_ASSERT(m_toRemoveList.isEmpty());
......@@ -299,7 +298,7 @@ void ToolChainModel::apply()
QStringList removedTcs;
nodes = m_toAddList;
foreach (ToolChainNode *n, nodes) {
if (!ToolChainManager::instance()->registerToolChain(n->toolChain))
if (!ToolChainManager::registerToolChain(n->toolChain))
removedTcs << n->toolChain->displayName();
}
//
......
This diff is collapsed.
......@@ -51,6 +51,8 @@
#include <QMessageBox>
#include <QFileInfo>
using namespace ProjectExplorer;
namespace Qnx {
namespace Internal {
......@@ -182,7 +184,7 @@ void BlackBerryConfigurationManager::saveManualConfigurations()
void BlackBerryConfigurationManager::clearInvalidConfigurations()
{
QList<NdkInstallInformation> autoNdks = QnxUtils::installedNdks();
foreach (ProjectExplorer::Kit *kit, ProjectExplorer::KitManager::kits()) {
foreach (Kit *kit, KitManager::kits()) {
if (!kit->isAutoDetected())
continue;
......@@ -190,7 +192,7 @@ void BlackBerryConfigurationManager::clearInvalidConfigurations()
// Check if related target is still installed
bool isValid = false;
foreach (const NdkInstallInformation &ndkInfo, autoNdks) {
if (ndkInfo.target == ProjectExplorer::SysRootKitInformation::sysRoot(kit).toString()) {
if (ndkInfo.target == SysRootKitInformation::sysRoot(kit).toString()) {
isValid = true;
break;
}
......@@ -198,9 +200,8 @@ void BlackBerryConfigurationManager::clearInvalidConfigurations()
if (!isValid) {
QtSupport::QtVersionManager::instance()->removeVersion(QtSupport::QtKitInformation::qtVersion(kit));
ProjectExplorer::ToolChainManager::instance()->deregisterToolChain(
ProjectExplorer::ToolChainKitInformation::toolChain(kit));
ProjectExplorer::KitManager::deregisterKit(kit);
ToolChainManager::deregisterToolChain(ToolChainKitInformation::toolChain(kit));
KitManager::deregisterKit(kit);
}
}
}
......
......@@ -37,117 +37,110 @@
#include <qtsupport/qtkitinformation.h>
using namespace ProjectExplorer;
using namespace Utils;
namespace Qt4ProjectManager {
namespace Internal {
const char MKSPEC_INFORMATION[] = "QtPM4.mkSpecInformation";
} // namespace Internal
QmakeKitInformation::QmakeKitInformation()
{
setObjectName(QLatin1String("QmakeKitInformation"));
setDataId(Internal::MKSPEC_INFORMATION);
setDataId(MKSPEC_INFORMATION);
setPriority(24000);
}
QVariant QmakeKitInformation::defaultValue(ProjectExplorer::Kit *k) const
QVariant QmakeKitInformation::defaultValue(Kit *k) const
{
Q_UNUSED(k);
return QString();
}
QList<ProjectExplorer::Task> QmakeKitInformation::validate(const ProjectExplorer::Kit *k) const
QList<Task> QmakeKitInformation::validate(const Kit *k) const
{
QList<ProjectExplorer::Task> result;
QList<Task> result;
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
Utils::FileName mkspec = QmakeKitInformation::mkspec(k);
FileName mkspec = QmakeKitInformation::mkspec(k);
if (!version && !mkspec.isEmpty())
result << ProjectExplorer::Task(ProjectExplorer::Task::Warning,
tr("No Qt version set, so mkspec is ignored."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
result << Task(Task::Warning, tr("No Qt version set, so mkspec is ignored."),
FileName(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM);
if (version && !version->hasMkspec(mkspec))
result << ProjectExplorer::Task(ProjectExplorer::Task::Error,
tr("Mkspec not found for Qt version."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
result << Task(Task::Error, tr("Mkspec not found for Qt version."),
FileName(), -1, Constants::TASK_CATEGORY_BUILDSYSTEM);
return result;
}
void QmakeKitInformation::setup(ProjectExplorer::Kit *k)
void QmakeKitInformation::setup(Kit *k)
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version)
return;
Utils::FileName spec = QmakeKitInformation::mkspec(k);
FileName spec = QmakeKitInformation::mkspec(k);
if (spec.isEmpty())
spec = version->mkspec();
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
ToolChain *tc = ToolChainKitInformation::toolChain(k);
if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec))) {
QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains();
ProjectExplorer::ToolChain *possibleTc = 0;
foreach (ProjectExplorer::ToolChain *current, tcList) {
ToolChain *possibleTc = 0;
foreach (ToolChain *current, ToolChainManager::toolChains()) {
if (version->qtAbis().contains(current->targetAbi())) {
possibleTc = current;
if (current->suggestedMkspecList().contains(spec))
break;
}
}
ProjectExplorer::ToolChainKitInformation::setToolChain(k, possibleTc);
ToolChainKitInformation::setToolChain(k, possibleTc);
}
}
ProjectExplorer::KitConfigWidget *
QmakeKitInformation::createConfigWidget(ProjectExplorer::Kit *k) const
KitConfigWidget *QmakeKitInformation::createConfigWidget(Kit *k) const
{
return new Internal::QmakeKitConfigWidget(k, isSticky(k));
}
ProjectExplorer::KitInformation::ItemList QmakeKitInformation::toUserOutput(const ProjectExplorer::Kit *k) const
KitInformation::ItemList QmakeKitInformation::toUserOutput(const Kit *k) const
{
return ItemList() << qMakePair(tr("mkspec"), mkspec(k).toUserOutput());
}
Utils::FileName QmakeKitInformation::mkspec(const ProjectExplorer::Kit *k)
FileName QmakeKitInformation::mkspec(const Kit *k)
{
if (!k)
return Utils::FileName();
return Utils::FileName::fromString(k->value(Core::Id(Internal::MKSPEC_INFORMATION)).toString());
return FileName();
return FileName::fromString(k->value(MKSPEC_INFORMATION).toString());
}
Utils::FileName QmakeKitInformation::effectiveMkspec(const ProjectExplorer::Kit *k)
FileName QmakeKitInformation::effectiveMkspec(const Kit *k)
{
if (!k)
return Utils::FileName();
Utils::FileName spec = mkspec(k);
return FileName();