Commit c10ae974 authored by hjk's avatar hjk Committed by Tobias Hunger

KitInformation: Make dataId and priority value members

More in line with recent development.

Change-Id: I38ad7dd0cb96080a9dc9cc3165e4fb7c78a736b3
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 36227d5c
......@@ -52,16 +52,8 @@ static const char ANDROID_GDBSERVER_INFORMATION[] = "Android.GdbServer.Informati
AndroidGdbServerKitInformation::AndroidGdbServerKitInformation()
{
}
Core::Id AndroidGdbServerKitInformation::dataId() const
{
return Core::Id(ANDROID_GDBSERVER_INFORMATION);
}
unsigned int AndroidGdbServerKitInformation::priority() const
{
return 27999; // Just one less than Debugger!
setDataId(ANDROID_GDBSERVER_INFORMATION);
setPriority(27999); // Just one less than Debugger!
}
QVariant AndroidGdbServerKitInformation::defaultValue(ProjectExplorer::Kit *kit) const
......
......@@ -69,10 +69,7 @@ class AndroidGdbServerKitInformation : public ProjectExplorer::KitInformation
{
Q_OBJECT
public:
explicit AndroidGdbServerKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
AndroidGdbServerKitInformation();
QVariant defaultValue(ProjectExplorer::Kit *) const;
......
......@@ -229,17 +229,8 @@ void DebuggerItem::reinitializeFromFile()
DebuggerKitInformation::DebuggerKitInformation()
{
setObjectName(QLatin1String("DebuggerKitInformation"));
}
Core::Id DebuggerKitInformation::dataId() const
{
static Core::Id id = Core::Id(DEBUGGER_INFORMATION);
return id;
}
unsigned int DebuggerKitInformation::priority() const
{
return 28000;
setDataId(DEBUGGER_INFORMATION);
setPriority(28000);
}
QVariant DebuggerKitInformation::defaultValue(Kit *k) const
......
......@@ -69,10 +69,6 @@ class DEBUGGER_EXPORT DebuggerKitInformation : public ProjectExplorer::KitInform
public:
DebuggerKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
QVariant defaultValue(ProjectExplorer::Kit *k) const;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const
......
......@@ -54,17 +54,8 @@ static const char SYSROOT_INFORMATION[] = "PE.Profile.SysRoot";
SysRootKitInformation::SysRootKitInformation()
{
setObjectName(QLatin1String("SysRootInformation"));
}
Core::Id SysRootKitInformation::dataId() const
{
static const Core::Id id(SYSROOT_INFORMATION);
return id;
}
unsigned int SysRootKitInformation::priority() const
{
return 31000;
setDataId(SYSROOT_INFORMATION);
setPriority(31000);
}
QVariant SysRootKitInformation::defaultValue(Kit *k) const
......@@ -127,21 +118,13 @@ static const char TOOLCHAIN_INFORMATION[] = "PE.Profile.ToolChain";
ToolChainKitInformation::ToolChainKitInformation()
{
setObjectName(QLatin1String("ToolChainInformation"));
setDataId(TOOLCHAIN_INFORMATION);
setPriority(30000);
connect(KitManager::instance(), SIGNAL(kitsLoaded()),
this, SLOT(kitsWereLoaded()));
}
Core::Id ToolChainKitInformation::dataId() const
{
static const Core::Id id(TOOLCHAIN_INFORMATION);
return id;
}
unsigned int ToolChainKitInformation::priority() const
{
return 30000;
}
QVariant ToolChainKitInformation::defaultValue(Kit *k) const
{
Q_UNUSED(k);
......@@ -292,17 +275,8 @@ static const char DEVICETYPE_INFORMATION[] = "PE.Profile.DeviceType";
DeviceTypeKitInformation::DeviceTypeKitInformation()
{
setObjectName(QLatin1String("DeviceTypeInformation"));
}
Core::Id DeviceTypeKitInformation::dataId() const
{
static const Core::Id id(DEVICETYPE_INFORMATION);
return id;
}
unsigned int DeviceTypeKitInformation::priority() const
{
return 33000;
setDataId(DEVICETYPE_INFORMATION);
setPriority(33000);
}
QVariant DeviceTypeKitInformation::defaultValue(Kit *k) const
......@@ -363,21 +337,13 @@ static const char DEVICE_INFORMATION[] = "PE.Profile.Device";
DeviceKitInformation::DeviceKitInformation()
{
setObjectName(QLatin1String("DeviceInformation"));
setDataId(DEVICE_INFORMATION);
setPriority(32000);
connect(KitManager::instance(), SIGNAL(kitsLoaded()),
this, SLOT(kitsWereLoaded()));
}
Core::Id DeviceKitInformation::dataId() const
{
static const Core::Id id(DEVICE_INFORMATION);
return id;
}
unsigned int DeviceKitInformation::priority() const
{
return 32000;
}
QVariant DeviceKitInformation::defaultValue(Kit *k) const
{
Core::Id type = DeviceTypeKitInformation::deviceTypeId(k);
......
......@@ -53,9 +53,6 @@ class PROJECTEXPLORER_EXPORT SysRootKitInformation : public KitInformation
public:
SysRootKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
QVariant defaultValue(Kit *k) const;
QList<Task> validate(const Kit *k) const;
......@@ -97,9 +94,6 @@ class PROJECTEXPLORER_EXPORT ToolChainKitInformation : public KitInformation
public:
ToolChainKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
QVariant defaultValue(Kit *k) const;
QList<Task> validate(const Kit *k) const;
......@@ -154,9 +148,6 @@ class PROJECTEXPLORER_EXPORT DeviceTypeKitInformation : public KitInformation
public:
DeviceTypeKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
QVariant defaultValue(Kit *k) const;
QList<Task> validate(const Kit *k) const;
......@@ -199,9 +190,6 @@ class PROJECTEXPLORER_EXPORT DeviceKitInformation : public KitInformation
public:
DeviceKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
QVariant defaultValue(Kit *k) const;
QList<Task> validate(const Kit *k) const;
......
......@@ -70,9 +70,8 @@ public:
typedef QPair<QString, QString> Item;
typedef QList<Item> ItemList;
virtual Core::Id dataId() const = 0;
virtual unsigned int priority() const = 0; // the higher the closer to the top.
Core::Id dataId() const { return m_dataId; }
int priority() const { return m_priority; }
virtual QVariant defaultValue(Kit *) const = 0;
......@@ -95,7 +94,13 @@ public:
bool isSticky(const Kit *k) const;
protected:
void setDataId(Core::Id id) { m_dataId = id; }
void setPriority(int priority) { m_priority = priority; }
void notifyAboutUpdate(Kit *k);
private:
Core::Id m_dataId;
int m_priority; // The higher the closer to the top.
};
class PROJECTEXPLORER_EXPORT KitMatcher
......
......@@ -45,17 +45,8 @@ const char MKSPEC_INFORMATION[] = "QtPM4.mkSpecInformation";
QmakeKitInformation::QmakeKitInformation()
{
setObjectName(QLatin1String("QmakeKitInformation"));
}
Core::Id QmakeKitInformation::dataId() const
{
static Core::Id id = Core::Id(Internal::MKSPEC_INFORMATION);
return id;
}
unsigned int QmakeKitInformation::priority() const
{
return 24000;
setDataId(Internal::MKSPEC_INFORMATION);
setPriority(24000);
}
QVariant QmakeKitInformation::defaultValue(ProjectExplorer::Kit *k) const
......
......@@ -43,10 +43,6 @@ class QT4PROJECTMANAGER_EXPORT QmakeKitInformation : public ProjectExplorer::Kit
public:
QmakeKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
QVariant defaultValue(ProjectExplorer::Kit *k) const;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const;
......
......@@ -45,21 +45,13 @@ const char QT_INFORMATION[] = "QtSupport.QtInformation";
QtKitInformation::QtKitInformation()
{
setObjectName(QLatin1String("QtKitInformation"));
setDataId(Internal::QT_INFORMATION);
setPriority(26000);
connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitsLoaded()),
this, SLOT(kitsWereLoaded()));
}
Core::Id QtKitInformation::dataId() const
{
static Core::Id id = Core::Id(Internal::QT_INFORMATION);
return id;
}
unsigned int QtKitInformation::priority() const
{
return 26000;
}
QVariant QtKitInformation::defaultValue(ProjectExplorer::Kit *k) const
{
Q_UNUSED(k);
......
......@@ -46,10 +46,6 @@ class QTSUPPORT_EXPORT QtKitInformation : public ProjectExplorer::KitInformation
public:
QtKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
QVariant defaultValue(ProjectExplorer::Kit *k) const;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const;
......
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