forked from qt-creator/qt-creator
ProjectExplorer: De-Q_OBJECT-ify DesktopRunConfiguration
... and move to .cpp, and sprinkle some 'final'. Change-Id: I07054cb226afe30f6e1fd89b0518253c8b2d38d5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -47,6 +47,23 @@ using namespace Utils;
|
|||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class DesktopRunConfiguration : public RunConfiguration
|
||||||
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::DesktopRunConfiguration)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
enum Kind { Qmake, Qbs, CMake }; // FIXME: Remove
|
||||||
|
|
||||||
|
DesktopRunConfiguration(Target *target, Core::Id id, Kind kind);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void updateTargetInformation();
|
||||||
|
|
||||||
|
Utils::FilePath executableToRun(const BuildTargetInfo &targetInfo) const;
|
||||||
|
|
||||||
|
const Kind m_kind;
|
||||||
|
};
|
||||||
|
|
||||||
DesktopRunConfiguration::DesktopRunConfiguration(Target *target, Core::Id id, Kind kind)
|
DesktopRunConfiguration::DesktopRunConfiguration(Target *target, Core::Id id, Kind kind)
|
||||||
: RunConfiguration(target, id), m_kind(kind)
|
: RunConfiguration(target, id), m_kind(kind)
|
||||||
{
|
{
|
||||||
@@ -148,7 +165,7 @@ Utils::FilePath DesktopRunConfiguration::executableToRun(const BuildTargetInfo &
|
|||||||
|
|
||||||
// Factory
|
// Factory
|
||||||
|
|
||||||
class DesktopQmakeRunConfiguration : public DesktopRunConfiguration
|
class DesktopQmakeRunConfiguration final : public DesktopRunConfiguration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DesktopQmakeRunConfiguration(Target *target, Core::Id id)
|
DesktopQmakeRunConfiguration(Target *target, Core::Id id)
|
||||||
@@ -156,7 +173,7 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
class QbsRunConfiguration : public DesktopRunConfiguration
|
class QbsRunConfiguration final : public DesktopRunConfiguration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QbsRunConfiguration(Target *target, Core::Id id)
|
QbsRunConfiguration(Target *target, Core::Id id)
|
||||||
@@ -164,7 +181,7 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CMakeRunConfiguration : public DesktopRunConfiguration
|
class CMakeRunConfiguration final : public DesktopRunConfiguration
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMakeRunConfiguration(Target *target, Core::Id id)
|
CMakeRunConfiguration(Target *target, Core::Id id)
|
||||||
|
@@ -31,36 +31,19 @@
|
|||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DesktopRunConfiguration : public RunConfiguration
|
class DesktopQmakeRunConfigurationFactory final : public RunConfigurationFactory
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
protected:
|
|
||||||
enum Kind { Qmake, Qbs, CMake }; // FIXME: Remove
|
|
||||||
|
|
||||||
DesktopRunConfiguration(Target *target, Core::Id id, Kind kind);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateTargetInformation();
|
|
||||||
|
|
||||||
Utils::FilePath executableToRun(const BuildTargetInfo &targetInfo) const;
|
|
||||||
|
|
||||||
const Kind m_kind;
|
|
||||||
};
|
|
||||||
|
|
||||||
class DesktopQmakeRunConfigurationFactory : public RunConfigurationFactory
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DesktopQmakeRunConfigurationFactory();
|
DesktopQmakeRunConfigurationFactory();
|
||||||
};
|
};
|
||||||
|
|
||||||
class QbsRunConfigurationFactory : public RunConfigurationFactory
|
class QbsRunConfigurationFactory final : public RunConfigurationFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QbsRunConfigurationFactory();
|
QbsRunConfigurationFactory();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CMakeRunConfigurationFactory : public RunConfigurationFactory
|
class CMakeRunConfigurationFactory final : public RunConfigurationFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMakeRunConfigurationFactory();
|
CMakeRunConfigurationFactory();
|
||||||
|
Reference in New Issue
Block a user