forked from qt-creator/qt-creator
QtSupport//ProjectExplorer: Move DesktopRunConfiguration implementation
It does not depend on QtSupport anymore. Change-Id: Ib2db6832fbc08d8893b362224372ef47df10ee7c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -43,6 +43,7 @@ add_qtc_plugin(ProjectExplorer
|
||||
deploymentdata.cpp deploymentdata.h
|
||||
deploymentdatamodel.cpp deploymentdatamodel.h
|
||||
deploymentdataview.cpp deploymentdataview.h deploymentdataview.ui
|
||||
desktoprunconfiguration.cpp desktoprunconfiguration.h
|
||||
devicesupport/desktopdevice.cpp devicesupport/desktopdevice.h
|
||||
devicesupport/desktopdeviceconfigurationwidget.cpp devicesupport/desktopdeviceconfigurationwidget.h devicesupport/desktopdeviceconfigurationwidget.ui
|
||||
devicesupport/desktopdevicefactory.cpp devicesupport/desktopdevicefactory.h
|
||||
|
@@ -25,12 +25,10 @@
|
||||
|
||||
#include "desktoprunconfiguration.h"
|
||||
|
||||
#include "qtoutputformatter.h"
|
||||
|
||||
#include <projectexplorer/localenvironmentaspect.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/runconfigurationaspects.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include "localenvironmentaspect.h"
|
||||
#include "project.h"
|
||||
#include "runconfigurationaspects.h"
|
||||
#include "target.h"
|
||||
|
||||
#include <cmakeprojectmanager/cmakeprojectconstants.h>
|
||||
#include <qbsprojectmanager/qbsprojectmanagerconstants.h>
|
||||
@@ -43,10 +41,9 @@
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace QtSupport {
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
|
||||
DesktopRunConfiguration::DesktopRunConfiguration(Target *target, Core::Id id, Kind kind)
|
@@ -25,32 +25,29 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "qtsupport_global.h"
|
||||
#include "runconfigurationaspects.h"
|
||||
#include "runcontrol.h"
|
||||
|
||||
#include "projectexplorer/runconfigurationaspects.h"
|
||||
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
namespace QtSupport {
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
|
||||
class DesktopRunConfiguration : public ProjectExplorer::RunConfiguration
|
||||
class DesktopRunConfiguration : public RunConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
protected:
|
||||
enum Kind { Qmake, Qbs, CMake }; // FIXME: Remove
|
||||
|
||||
DesktopRunConfiguration(ProjectExplorer::Target *target, Core::Id id, Kind kind);
|
||||
DesktopRunConfiguration(Target *target, Core::Id id, Kind kind);
|
||||
|
||||
private:
|
||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &info) final;
|
||||
void doAdditionalSetup(const RunConfigurationCreationInfo &info) final;
|
||||
bool fromMap(const QVariantMap &map) final;
|
||||
void updateEnabledState() final;
|
||||
|
||||
void updateTargetInformation();
|
||||
|
||||
Utils::FilePath executableToRun(const ProjectExplorer::BuildTargetInfo &targetInfo) const;
|
||||
Utils::FilePath executableToRun(const BuildTargetInfo &targetInfo) const;
|
||||
QString disabledReason() const override;
|
||||
|
||||
bool isBuildTargetValid() const;
|
||||
@@ -58,23 +55,23 @@ private:
|
||||
const Kind m_kind;
|
||||
};
|
||||
|
||||
class DesktopQmakeRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
|
||||
class DesktopQmakeRunConfigurationFactory : public RunConfigurationFactory
|
||||
{
|
||||
public:
|
||||
DesktopQmakeRunConfigurationFactory();
|
||||
};
|
||||
|
||||
class QbsRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
|
||||
class QbsRunConfigurationFactory : public RunConfigurationFactory
|
||||
{
|
||||
public:
|
||||
QbsRunConfigurationFactory();
|
||||
};
|
||||
|
||||
class CMakeRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
|
||||
class CMakeRunConfigurationFactory : public RunConfigurationFactory
|
||||
{
|
||||
public:
|
||||
CMakeRunConfigurationFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QtSupport
|
||||
} // namespace ProjectExplorer
|
@@ -33,6 +33,7 @@
|
||||
#include "customwizard/customwizard.h"
|
||||
#include "deployablefile.h"
|
||||
#include "deployconfiguration.h"
|
||||
#include "desktoprunconfiguration.h"
|
||||
#include "extraabi.h"
|
||||
#include "gcctoolchainfactories.h"
|
||||
#ifdef WITH_JOURNALD
|
||||
@@ -591,6 +592,17 @@ public:
|
||||
ToolChainKitAspect toolChainKitAspect;
|
||||
SysRootKitAspect sysRootKitAspect;
|
||||
EnvironmentKitAspect environmentKitAspect;
|
||||
|
||||
DesktopQmakeRunConfigurationFactory qmakeRunConfigFactory;
|
||||
QbsRunConfigurationFactory qbsRunConfigFactory;
|
||||
CMakeRunConfigurationFactory cmakeRunConfigFactory;
|
||||
|
||||
RunWorkerFactory desktopRunWorkerFactory{
|
||||
RunWorkerFactory::make<SimpleTargetRunner>(),
|
||||
{ProjectExplorer::Constants::NORMAL_RUN_MODE},
|
||||
{qmakeRunConfigFactory.id(), qbsRunConfigFactory.id(), cmakeRunConfigFactory.id()}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
static ProjectExplorerPlugin *m_instance = nullptr;
|
||||
|
@@ -15,6 +15,7 @@ HEADERS += projectexplorer.h \
|
||||
buildinfo.h \
|
||||
clangparser.h \
|
||||
configtaskhandler.h \
|
||||
desktoprunconfiguration.h \
|
||||
environmentaspect.h \
|
||||
environmentaspectwidget.h \
|
||||
extraabi.h \
|
||||
@@ -173,6 +174,7 @@ SOURCES += projectexplorer.cpp \
|
||||
buildinfo.cpp \
|
||||
clangparser.cpp \
|
||||
configtaskhandler.cpp \
|
||||
desktoprunconfiguration.cpp \
|
||||
environmentaspect.cpp \
|
||||
environmentaspectwidget.cpp \
|
||||
extraabi.cpp \
|
||||
|
@@ -62,6 +62,7 @@ Project {
|
||||
"deploymentdataview.ui",
|
||||
"deploymentdatamodel.cpp",
|
||||
"deploymentdatamodel.h",
|
||||
"desktoprunconfiguration.cpp", "desktoprunconfiguration.h",
|
||||
"editorconfiguration.cpp", "editorconfiguration.h",
|
||||
"editorsettingspropertiespage.cpp", "editorsettingspropertiespage.h", "editorsettingspropertiespage.ui",
|
||||
"environmentaspect.cpp", "environmentaspect.h",
|
||||
|
@@ -9,7 +9,6 @@ add_qtc_plugin(QtSupport
|
||||
codegensettingspage.cpp codegensettingspage.h
|
||||
codegensettingspagewidget.ui
|
||||
desktopqtversion.cpp desktopqtversion.h
|
||||
desktoprunconfiguration.cpp desktoprunconfiguration.h
|
||||
exampleslistmodel.cpp exampleslistmodel.h
|
||||
gettingstartedwelcomepage.cpp gettingstartedwelcomepage.h
|
||||
profilereader.cpp profilereader.h
|
||||
|
@@ -32,7 +32,6 @@ HEADERS += \
|
||||
desktopqtversion.h \
|
||||
uicgenerator.h \
|
||||
qscxmlcgenerator.h \
|
||||
desktoprunconfiguration.h \
|
||||
translationwizardpage.h
|
||||
|
||||
SOURCES += \
|
||||
@@ -59,7 +58,6 @@ SOURCES += \
|
||||
desktopqtversion.cpp \
|
||||
uicgenerator.cpp \
|
||||
qscxmlcgenerator.cpp \
|
||||
desktoprunconfiguration.cpp \
|
||||
translationwizardpage.cpp
|
||||
|
||||
FORMS += \
|
||||
|
@@ -67,8 +67,6 @@ Project {
|
||||
"codegensettingspage.cpp",
|
||||
"codegensettingspage.h",
|
||||
"codegensettingspagewidget.ui",
|
||||
"desktoprunconfiguration.cpp",
|
||||
"desktoprunconfiguration.h",
|
||||
"qtconfigwidget.cpp",
|
||||
"qtconfigwidget.h",
|
||||
"qtcppkitinfo.cpp",
|
||||
|
@@ -40,7 +40,6 @@
|
||||
#include "qscxmlcgenerator.h"
|
||||
|
||||
#include "desktopqtversion.h"
|
||||
#include "desktoprunconfiguration.h"
|
||||
#include "profilereader.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -72,16 +71,6 @@ public:
|
||||
CodeGenSettingsPage codeGenSettingsPage;
|
||||
QtOptionsPage qtOptionsPage;
|
||||
|
||||
DesktopQmakeRunConfigurationFactory qmakeRunConfigFactory;
|
||||
QbsRunConfigurationFactory qbsRunConfigFactory;
|
||||
CMakeRunConfigurationFactory cmakeRunConfigFactory;
|
||||
|
||||
RunWorkerFactory desktopRunWorkerFactory{
|
||||
RunWorkerFactory::make<SimpleTargetRunner>(),
|
||||
{ProjectExplorer::Constants::NORMAL_RUN_MODE},
|
||||
{qmakeRunConfigFactory.id(), qbsRunConfigFactory.id(), cmakeRunConfigFactory.id()}
|
||||
};
|
||||
|
||||
ExamplesWelcomePage examplesPage{true};
|
||||
ExamplesWelcomePage tutorialPage{false};
|
||||
|
||||
|
Reference in New Issue
Block a user