Commit 4e3c7b98 authored by Tobias Hunger's avatar Tobias Hunger

Kit: Provide interface to mark individual kit information sticky

Change-Id: Ic45aae21cb8b0f4e4fdd0dcf1009f127e489920c
Reviewed-by: default avatarMehdi Fekari <mfekari@blackberry.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 6aceadac
......@@ -104,6 +104,11 @@ Utils::FileName AndroidGdbServerKitInformation::autoDetect(ProjectExplorer::Kit
return atc->suggestedGdbServer();
}
void AndroidGdbServerKitInformation::makeSticky(ProjectExplorer::Kit *k)
{
k->makeSticky(ANDROIDGDBSERVER_INFORMATION);
}
///////////////
// AndroidGdbServerKitInformationWidget
///////////////
......
......@@ -85,6 +85,7 @@ public:
static Utils::FileName gdbServer(const ProjectExplorer::Kit *kit);
static void setGdbSever(ProjectExplorer::Kit *kit, const Utils::FileName &gdbServerCommand);
static Utils::FileName autoDetect(ProjectExplorer::Kit *kit);
static void makeSticky(ProjectExplorer::Kit *k);
};
} // namespace Internal
......
......@@ -375,4 +375,9 @@ QString DebuggerKitInformation::debuggerEngineName(DebuggerEngineType t)
return QString();
}
void DebuggerKitInformation::makeSticky(Kit *k)
{
k->makeSticky(DEBUGGER_INFORMATION);
}
} // namespace Debugger
......@@ -90,6 +90,8 @@ public:
static QString debuggerEngineName(DebuggerEngineType t);
static void makeSticky(ProjectExplorer::Kit *k);
private:
static DebuggerItem variantToItem(const QVariant &v);
static QVariant itemToVariant(const DebuggerItem &i);
......
......@@ -113,6 +113,11 @@ void SysRootKitInformation::setSysRoot(Kit *k, const Utils::FileName &v)
k->setValue(Core::Id(SYSROOT_INFORMATION), v.toString());
}
void SysRootKitInformation::makeSticky(Kit *k)
{
k->makeSticky(SYSROOT_INFORMATION);
}
// --------------------------------------------------------------------------
// ToolChainInformation:
// --------------------------------------------------------------------------
......@@ -248,6 +253,11 @@ QString ToolChainKitInformation::msgNoToolChainInTarget()
return tr("No compiler set in kit.");
}
void ToolChainKitInformation::makeSticky(Kit *k)
{
k->makeSticky(TOOLCHAIN_INFORMATION);
}
void ToolChainKitInformation::kitsWereLoaded()
{
foreach (Kit *k, KitManager::instance()->kits())
......@@ -339,6 +349,11 @@ void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
k->setValue(DEVICETYPE_INFORMATION, type.toSetting());
}
void DeviceTypeKitInformation::makeSticky(Kit *k)
{
k->makeSticky(DEVICETYPE_INFORMATION);
}
// --------------------------------------------------------------------------
// DeviceInformation:
// --------------------------------------------------------------------------
......@@ -441,6 +456,11 @@ void DeviceKitInformation::setDeviceId(Kit *k, const Core::Id id)
k->setValue(DEVICE_INFORMATION, id.toSetting());
}
void DeviceKitInformation::makeSticky(Kit *k)
{
k->makeSticky(DEVICE_INFORMATION);
}
void DeviceKitInformation::kitsWereLoaded()
{
foreach (Kit *k, KitManager::instance()->kits())
......
......@@ -67,6 +67,8 @@ public:
static bool hasSysRoot(const Kit *k);
static Utils::FileName sysRoot(const Kit *k);
static void setSysRoot(Kit *k, const Utils::FileName &v);
static void makeSticky(Kit *k);
};
class PROJECTEXPLORER_EXPORT SysRootMatcher : public KitMatcher
......@@ -117,6 +119,9 @@ public:
static void setToolChain(Kit *k, ToolChain *tc);
static QString msgNoToolChainInTarget();
static void makeSticky(Kit *k);
private slots:
void kitsWereLoaded();
void toolChainUpdated(ProjectExplorer::ToolChain *tc);
......@@ -162,6 +167,7 @@ public:
static const Core::Id deviceTypeId(const Kit *k);
static void setDeviceTypeId(Kit *k, Core::Id type);
static void makeSticky(Kit *k);
};
class PROJECTEXPLORER_EXPORT DeviceTypeMatcher : public KitMatcher
......@@ -213,6 +219,8 @@ public:
static void setDevice(Kit *k, IDevice::ConstPtr dev);
static void setDeviceId(Kit *k, const Core::Id id);
static void makeSticky(Kit *k);
private slots:
void kitsWereLoaded();
void deviceUpdated(const Core::Id &id);
......
......@@ -154,4 +154,9 @@ Utils::FileName QmakeKitInformation::defaultMkspec(const ProjectExplorer::Kit *k
return version->mkspecFor(ProjectExplorer::ToolChainKitInformation::toolChain(k));
}
void QmakeKitInformation::makeSticky(ProjectExplorer::Kit *k)
{
k->makeSticky(Internal::MKSPEC_INFORMATION);
}
} // namespace Qt4ProjectManager
......@@ -61,6 +61,7 @@ public:
static Utils::FileName effectiveMkspec(const ProjectExplorer::Kit *k);
static Utils::FileName defaultMkspec(const ProjectExplorer::Kit *k);
static void makeSticky(ProjectExplorer::Kit *k);
};
} // namespace Qt4ProjectManager
......
......@@ -196,6 +196,11 @@ QStringList QtKitInformation::dumperLibraryLocations(const ProjectExplorer::Kit
return QStringList();
}
void QtKitInformation::makeSticky(ProjectExplorer::Kit *k)
{
k->makeSticky(Internal::QT_INFORMATION);
}
void QtKitInformation::qtVersionsChanged(const QList<int> &addedIds,
const QList<int> &removedIds,
const QList<int> &changedIds)
......
......@@ -74,6 +74,8 @@ public:
static QString dumperLibrary(const ProjectExplorer::Kit *k);
static QStringList dumperLibraryLocations(const ProjectExplorer::Kit *k);
static void makeSticky(ProjectExplorer::Kit *k);
private slots:
void qtVersionsChanged(const QList<int> &addedIds,
const QList<int> &removedIds,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment