forked from qt-creator/qt-creator
Kit: makeSticky() -> setSticky(), allows for unsetting sticky bit
Change-Id: I6aa7d7d52b681ee61d27c2d98e6fefe9cfd9532b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -110,9 +110,9 @@ FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
|
|||||||
return atc->suggestedGdbServer();
|
return atc->suggestedGdbServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidGdbServerKitInformation::makeSticky(Kit *k)
|
void AndroidGdbServerKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(ANDROID_GDBSERVER_INFORMATION);
|
k->setSticky(ANDROID_GDBSERVER_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public:
|
|||||||
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 makeSticky(ProjectExplorer::Kit *k);
|
static void setSticky(ProjectExplorer::Kit *k, bool b);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -362,9 +362,9 @@ void DebuggerKitInformation::setDebuggerCommand(Kit *k, const FileName &command)
|
|||||||
k->setValue(DEBUGGER_INFORMATION, id);
|
k->setValue(DEBUGGER_INFORMATION, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerKitInformation::makeSticky(Kit *k)
|
void DebuggerKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(DEBUGGER_INFORMATION);
|
k->setSticky(DEBUGGER_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
static DebuggerEngineType engineType(const ProjectExplorer::Kit *k)
|
static DebuggerEngineType engineType(const ProjectExplorer::Kit *k)
|
||||||
{ return debuggerItem(k).engineType; }
|
{ return debuggerItem(k).engineType; }
|
||||||
|
|
||||||
static void makeSticky(ProjectExplorer::Kit *k);
|
static void setSticky(ProjectExplorer::Kit *k, bool b);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool operator==(const DebuggerItem &i1, const DebuggerItem &i2)
|
inline bool operator==(const DebuggerItem &i1, const DebuggerItem &i2)
|
||||||
|
|||||||
@@ -472,13 +472,16 @@ void Kit::makeSticky()
|
|||||||
{
|
{
|
||||||
foreach (KitInformation *ki, KitManager::kitInformation()) {
|
foreach (KitInformation *ki, KitManager::kitInformation()) {
|
||||||
if (hasValue(ki->dataId()))
|
if (hasValue(ki->dataId()))
|
||||||
makeSticky(ki->dataId());
|
setSticky(ki->dataId(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::makeSticky(Core::Id id)
|
void Kit::setSticky(Core::Id id, bool b)
|
||||||
{
|
{
|
||||||
d->m_sticky.insert(id);
|
if (b)
|
||||||
|
d->m_sticky.insert(id);
|
||||||
|
else
|
||||||
|
d->m_sticky.remove(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::makeUnSticky()
|
void Kit::makeUnSticky()
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public:
|
|||||||
|
|
||||||
void setAutoDetected(bool detected);
|
void setAutoDetected(bool detected);
|
||||||
void makeSticky();
|
void makeSticky();
|
||||||
void makeSticky(Core::Id id);
|
void setSticky(Core::Id id, bool b);
|
||||||
void makeUnSticky();
|
void makeUnSticky();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -104,9 +104,9 @@ void SysRootKitInformation::setSysRoot(Kit *k, const Utils::FileName &v)
|
|||||||
k->setValue(Core::Id(SYSROOT_INFORMATION), v.toString());
|
k->setValue(Core::Id(SYSROOT_INFORMATION), v.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SysRootKitInformation::makeSticky(Kit *k)
|
void SysRootKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(SYSROOT_INFORMATION);
|
k->setSticky(SYSROOT_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -235,9 +235,9 @@ QString ToolChainKitInformation::msgNoToolChainInTarget()
|
|||||||
return tr("No compiler set in kit.");
|
return tr("No compiler set in kit.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolChainKitInformation::makeSticky(Kit *k)
|
void ToolChainKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(TOOLCHAIN_INFORMATION);
|
k->setSticky(TOOLCHAIN_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolChainKitInformation::kitsWereLoaded()
|
void ToolChainKitInformation::kitsWereLoaded()
|
||||||
@@ -322,9 +322,9 @@ void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
|
|||||||
k->setValue(DEVICETYPE_INFORMATION, type.toSetting());
|
k->setValue(DEVICETYPE_INFORMATION, type.toSetting());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceTypeKitInformation::makeSticky(Kit *k)
|
void DeviceTypeKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(DEVICETYPE_INFORMATION);
|
k->setSticky(DEVICETYPE_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -421,9 +421,9 @@ void DeviceKitInformation::setDeviceId(Kit *k, const Core::Id id)
|
|||||||
k->setValue(DEVICE_INFORMATION, id.toSetting());
|
k->setValue(DEVICE_INFORMATION, id.toSetting());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceKitInformation::makeSticky(Kit *k)
|
void DeviceKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(DEVICE_INFORMATION);
|
k->setSticky(DEVICE_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceKitInformation::kitsWereLoaded()
|
void DeviceKitInformation::kitsWereLoaded()
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public:
|
|||||||
static Utils::FileName sysRoot(const Kit *k);
|
static Utils::FileName sysRoot(const Kit *k);
|
||||||
static void setSysRoot(Kit *k, const Utils::FileName &v);
|
static void setSysRoot(Kit *k, const Utils::FileName &v);
|
||||||
|
|
||||||
static void makeSticky(Kit *k);
|
static void setSticky(Kit *k, bool b);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT SysRootMatcher : public KitMatcher
|
class PROJECTEXPLORER_EXPORT SysRootMatcher : public KitMatcher
|
||||||
@@ -114,7 +114,7 @@ public:
|
|||||||
|
|
||||||
static QString msgNoToolChainInTarget();
|
static QString msgNoToolChainInTarget();
|
||||||
|
|
||||||
static void makeSticky(Kit *k);
|
static void setSticky(Kit *k, bool b);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void kitsWereLoaded();
|
void kitsWereLoaded();
|
||||||
@@ -158,7 +158,7 @@ public:
|
|||||||
|
|
||||||
static const Core::Id deviceTypeId(const Kit *k);
|
static const Core::Id deviceTypeId(const Kit *k);
|
||||||
static void setDeviceTypeId(Kit *k, Core::Id type);
|
static void setDeviceTypeId(Kit *k, Core::Id type);
|
||||||
static void makeSticky(Kit *k);
|
static void setSticky(Kit *k, bool b);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT DeviceTypeMatcher : public KitMatcher
|
class PROJECTEXPLORER_EXPORT DeviceTypeMatcher : public KitMatcher
|
||||||
@@ -207,7 +207,7 @@ public:
|
|||||||
static void setDevice(Kit *k, IDevice::ConstPtr dev);
|
static void setDevice(Kit *k, IDevice::ConstPtr dev);
|
||||||
static void setDeviceId(Kit *k, const Core::Id id);
|
static void setDeviceId(Kit *k, const Core::Id id);
|
||||||
|
|
||||||
static void makeSticky(Kit *k);
|
static void setSticky(Kit *k, bool b);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void kitsWereLoaded();
|
void kitsWereLoaded();
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ void KitManager::restoreKits()
|
|||||||
// Copy sticky settings over:
|
// Copy sticky settings over:
|
||||||
if (current->isSticky(ki->dataId())) {
|
if (current->isSticky(ki->dataId())) {
|
||||||
toStore->setValue(ki->dataId(), current->value(ki->dataId()));
|
toStore->setValue(ki->dataId(), current->value(ki->dataId()));
|
||||||
toStore->makeSticky(ki->dataId());
|
toStore->setSticky(ki->dataId(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,12 +285,12 @@ Kit *BlackBerryConfiguration::createKit(QnxArchitecture arch, BaseQtVersion *qtV
|
|||||||
|
|
||||||
void BlackBerryConfiguration::setSticky(Kit *kit)
|
void BlackBerryConfiguration::setSticky(Kit *kit)
|
||||||
{
|
{
|
||||||
QtKitInformation::makeSticky(kit);
|
QtKitInformation::setSticky(kit, true);
|
||||||
ToolChainKitInformation::makeSticky(kit);
|
ToolChainKitInformation::setSticky(kit, true);
|
||||||
DeviceTypeKitInformation::makeSticky(kit);
|
DeviceTypeKitInformation::setSticky(kit, true);
|
||||||
SysRootKitInformation::makeSticky(kit);
|
SysRootKitInformation::setSticky(kit, true);
|
||||||
Debugger::DebuggerKitInformation::makeSticky(kit);
|
Debugger::DebuggerKitInformation::setSticky(kit, true);
|
||||||
Qt4ProjectManager::QmakeKitInformation::makeSticky(kit);
|
Qt4ProjectManager::QmakeKitInformation::setSticky(kit, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BlackBerryConfiguration::activate()
|
bool BlackBerryConfiguration::activate()
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ FileName QmakeKitInformation::defaultMkspec(const Kit *k)
|
|||||||
return version->mkspecFor(ToolChainKitInformation::toolChain(k));
|
return version->mkspecFor(ToolChainKitInformation::toolChain(k));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeKitInformation::makeSticky(Kit *k)
|
void QmakeKitInformation::setSticky(Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(MKSPEC_INFORMATION);
|
k->setSticky(MKSPEC_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Qt4ProjectManager
|
} // namespace Qt4ProjectManager
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
static Utils::FileName effectiveMkspec(const ProjectExplorer::Kit *k);
|
static Utils::FileName effectiveMkspec(const ProjectExplorer::Kit *k);
|
||||||
static Utils::FileName defaultMkspec(const ProjectExplorer::Kit *k);
|
static Utils::FileName defaultMkspec(const ProjectExplorer::Kit *k);
|
||||||
|
|
||||||
static void makeSticky(ProjectExplorer::Kit *k);
|
static void setSticky(ProjectExplorer::Kit *k, bool b);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Qt4ProjectManager
|
} // namespace Qt4ProjectManager
|
||||||
|
|||||||
@@ -186,9 +186,9 @@ QStringList QtKitInformation::dumperLibraryLocations(const ProjectExplorer::Kit
|
|||||||
return QStringList();
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtKitInformation::makeSticky(ProjectExplorer::Kit *k)
|
void QtKitInformation::setSticky(ProjectExplorer::Kit *k, bool b)
|
||||||
{
|
{
|
||||||
k->makeSticky(Internal::QT_INFORMATION);
|
k->setSticky(Internal::QT_INFORMATION, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtKitInformation::qtVersionsChanged(const QList<int> &addedIds,
|
void QtKitInformation::qtVersionsChanged(const QList<int> &addedIds,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
static QString dumperLibrary(const ProjectExplorer::Kit *k);
|
static QString dumperLibrary(const ProjectExplorer::Kit *k);
|
||||||
static QStringList dumperLibraryLocations(const ProjectExplorer::Kit *k);
|
static QStringList dumperLibraryLocations(const ProjectExplorer::Kit *k);
|
||||||
|
|
||||||
static void makeSticky(ProjectExplorer::Kit *k);
|
static void setSticky(ProjectExplorer::Kit *k, bool b);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void qtVersionsChanged(const QList<int> &addedIds,
|
void qtVersionsChanged(const QList<int> &addedIds,
|
||||||
|
|||||||
Reference in New Issue
Block a user