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