Commit eafb6670 authored by Tobias Hunger's avatar Tobias Hunger

KitInformation: Make defaultValue take a const Kit *

There is no reason not to.

Change-Id: I4accb0b690173d93ad6f4c9dd0bce66d8de75faa
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 7f61a590
......@@ -53,7 +53,7 @@ AndroidGdbServerKitInformation::AndroidGdbServerKitInformation()
setPriority(27999); // Just one less than Debugger!
}
QVariant AndroidGdbServerKitInformation::defaultValue(Kit *kit) const
QVariant AndroidGdbServerKitInformation::defaultValue(const Kit *kit) const
{
return autoDetect(kit).toString();
}
......@@ -100,7 +100,7 @@ void AndroidGdbServerKitInformation::setGdbSever(Kit *kit, const FileName &gdbSe
kit->setValue(AndroidGdbServerKitInformation::id(), gdbServerCommand.toString());
}
FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
FileName AndroidGdbServerKitInformation::autoDetect(const Kit *kit)
{
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (!tc || tc->typeId() != Constants::ANDROID_TOOLCHAIN_ID)
......
......@@ -68,7 +68,7 @@ class AndroidGdbServerKitInformation : public ProjectExplorer::KitInformation
public:
AndroidGdbServerKitInformation();
QVariant defaultValue(ProjectExplorer::Kit *) const override;
QVariant defaultValue(const ProjectExplorer::Kit *) const override;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *) const override;
......@@ -80,7 +80,7 @@ public:
static bool isAndroidKit(const ProjectExplorer::Kit *kit);
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 Utils::FileName autoDetect(const ProjectExplorer::Kit *kit);
};
} // namespace Internal
......
......@@ -91,7 +91,7 @@ Core::Id CMakeKitInformation::defaultValue()
return Core::Id();
}
QVariant CMakeKitInformation::defaultValue(Kit *) const
QVariant CMakeKitInformation::defaultValue(const Kit *) const
{
return defaultValue().toSetting();
}
......
......@@ -46,7 +46,7 @@ public:
static Core::Id defaultValue();
// KitInformation interface
QVariant defaultValue(ProjectExplorer::Kit *) const override;
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
void setup(ProjectExplorer::Kit *k) override;
void fix(ProjectExplorer::Kit *k) override;
......@@ -55,4 +55,3 @@ public:
};
} // namespace CMakeProjectManager
......@@ -51,7 +51,7 @@ Core::Id CMakePreloadCacheKitInformation::id()
return "CMakeProjectManager.CMakePreloadCacheKitInformation";
}
QVariant CMakePreloadCacheKitInformation::defaultValue(Kit *) const
QVariant CMakePreloadCacheKitInformation::defaultValue(const Kit *) const
{
return QString();
}
......
......@@ -40,7 +40,7 @@ public:
static Core::Id id();
// KitInformation interface
QVariant defaultValue(ProjectExplorer::Kit *) const override;
QVariant defaultValue(const ProjectExplorer::Kit *) const override;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
void setup(ProjectExplorer::Kit *k) override;
void fix(ProjectExplorer::Kit *k) override;
......
......@@ -55,7 +55,7 @@ DebuggerKitInformation::DebuggerKitInformation()
setPriority(28000);
}
QVariant DebuggerKitInformation::defaultValue(Kit *k) const
QVariant DebuggerKitInformation::defaultValue(const Kit *k) const
{
ToolChain *tc = ToolChainKitInformation::toolChain(k);
if (!tc)
......
......@@ -41,7 +41,7 @@ class DEBUGGER_EXPORT DebuggerKitInformation : public ProjectExplorer::KitInform
public:
DebuggerKitInformation();
QVariant defaultValue(ProjectExplorer::Kit *k) const override;
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override
{ return DebuggerKitInformation::validateDebugger(k); }
......
......@@ -56,7 +56,7 @@ SysRootKitInformation::SysRootKitInformation()
setPriority(31000);
}
QVariant SysRootKitInformation::defaultValue(Kit *k) const
QVariant SysRootKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k)
return QString();
......@@ -122,7 +122,7 @@ ToolChainKitInformation::ToolChainKitInformation()
this, &ToolChainKitInformation::kitsWereLoaded);
}
QVariant ToolChainKitInformation::defaultValue(Kit *k) const
QVariant ToolChainKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k);
QList<ToolChain *> tcList = ToolChainManager::toolChains();
......@@ -282,7 +282,7 @@ DeviceTypeKitInformation::DeviceTypeKitInformation()
setPriority(33000);
}
QVariant DeviceTypeKitInformation::defaultValue(Kit *k) const
QVariant DeviceTypeKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k);
return QByteArray(Constants::DESKTOP_DEVICE_TYPE);
......@@ -364,7 +364,7 @@ DeviceKitInformation::DeviceKitInformation()
this, &DeviceKitInformation::kitsWereLoaded);
}
QVariant DeviceKitInformation::defaultValue(Kit *k) const
QVariant DeviceKitInformation::defaultValue(const Kit *k) const
{
Core::Id type = DeviceTypeKitInformation::deviceTypeId(k);
// Use default device if that is compatible:
......@@ -529,7 +529,7 @@ EnvironmentKitInformation::EnvironmentKitInformation()
setPriority(29000);
}
QVariant EnvironmentKitInformation::defaultValue(Kit *k) const
QVariant EnvironmentKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k)
return QStringList();
......
......@@ -49,7 +49,7 @@ class PROJECTEXPLORER_EXPORT SysRootKitInformation : public KitInformation
public:
SysRootKitInformation();
QVariant defaultValue(Kit *k) const override;
QVariant defaultValue(const Kit *k) const override;
QList<Task> validate(const Kit *k) const override;
......@@ -74,7 +74,7 @@ class PROJECTEXPLORER_EXPORT ToolChainKitInformation : public KitInformation
public:
ToolChainKitInformation();
QVariant defaultValue(Kit *k) const override;
QVariant defaultValue(const Kit *k) const override;
QList<Task> validate(const Kit *k) const override;
void fix(Kit *k) override;
......@@ -113,7 +113,7 @@ class PROJECTEXPLORER_EXPORT DeviceTypeKitInformation : public KitInformation
public:
DeviceTypeKitInformation();
QVariant defaultValue(Kit *k) const override;
QVariant defaultValue(const Kit *k) const override;
QList<Task> validate(const Kit *k) const override;
......@@ -142,7 +142,7 @@ class PROJECTEXPLORER_EXPORT DeviceKitInformation : public KitInformation
public:
DeviceKitInformation();
QVariant defaultValue(Kit *k) const override;
QVariant defaultValue(const Kit *k) const override;
QList<Task> validate(const Kit *k) const override;
void fix(Kit *k) override;
......@@ -180,7 +180,7 @@ class PROJECTEXPLORER_EXPORT EnvironmentKitInformation : public KitInformation
public:
EnvironmentKitInformation();
QVariant defaultValue(Kit *k) const override;
QVariant defaultValue(const Kit *k) const override;
QList<Task> validate(const Kit *k) const override;
void fix(Kit *k) override;
......
......@@ -71,7 +71,7 @@ public:
Core::Id id() const { return m_id; }
int priority() const { return m_priority; }
virtual QVariant defaultValue(Kit *) const = 0;
virtual QVariant defaultValue(const Kit *) const = 0;
// called to find issues with the kit
virtual QList<Task> validate(const Kit *) const = 0;
......
......@@ -45,7 +45,7 @@ QmakeKitInformation::QmakeKitInformation()
setPriority(24000);
}
QVariant QmakeKitInformation::defaultValue(Kit *k) const
QVariant QmakeKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k);
return QString();
......
......@@ -39,7 +39,7 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeKitInformation : public ProjectExplorer::K
public:
QmakeKitInformation();
QVariant defaultValue(ProjectExplorer::Kit *k) const override;
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
void setup(ProjectExplorer::Kit *k) override;
......
......@@ -53,7 +53,7 @@ QtKitInformation::QtKitInformation()
this, &QtKitInformation::kitsWereLoaded);
}
QVariant QtKitInformation::defaultValue(ProjectExplorer::Kit *k) const
QVariant QtKitInformation::defaultValue(const Kit *k) const
{
Q_UNUSED(k);
......
......@@ -43,7 +43,7 @@ class QTSUPPORT_EXPORT QtKitInformation : public ProjectExplorer::KitInformation
public:
QtKitInformation();
QVariant defaultValue(ProjectExplorer::Kit *k) const override;
QVariant defaultValue(const ProjectExplorer::Kit *k) const override;
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
void fix(ProjectExplorer::Kit *) override;
......
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