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