forked from qt-creator/qt-creator
ProjectExplorer: Remove IRunConfigurationAspect::runConfiguration
... and adapt constructors to not take the now-unneeded RunConfiguration pointer. Change-Id: I53ff338f51334ff7b0c22d4bed92bfcfc8225ea7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -56,10 +56,7 @@ using namespace Utils;
|
||||
|
||||
namespace Android {
|
||||
|
||||
BaseStringListAspect::BaseStringListAspect(RunConfiguration *runConfig,
|
||||
const QString &settingsKey,
|
||||
Core::Id id)
|
||||
: IRunConfigurationAspect(runConfig)
|
||||
BaseStringListAspect::BaseStringListAspect(const QString &settingsKey, Core::Id id)
|
||||
{
|
||||
setSettingsKey(settingsKey);
|
||||
setId(id);
|
||||
|
||||
@@ -39,8 +39,7 @@ class BaseStringListAspect : public ProjectExplorer::IRunConfigurationAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BaseStringListAspect(ProjectExplorer::RunConfiguration *rc,
|
||||
const QString &settingsKey = QString(),
|
||||
explicit BaseStringListAspect(const QString &settingsKey = QString(),
|
||||
Core::Id id = Core::Id());
|
||||
~BaseStringListAspect() override;
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ enum BaseEnvironmentBase {
|
||||
|
||||
namespace Android {
|
||||
|
||||
AndroidRunEnvironmentAspect::AndroidRunEnvironmentAspect(ProjectExplorer::RunConfiguration *rc) :
|
||||
ProjectExplorer::EnvironmentAspect (rc)
|
||||
AndroidRunEnvironmentAspect::AndroidRunEnvironmentAspect()
|
||||
{
|
||||
addSupportedBaseEnvironment(CleanEnvironmentBase, tr("Clean Environment"));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class AndroidRunEnvironmentAspect : public ProjectExplorer::EnvironmentAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AndroidRunEnvironmentAspect(ProjectExplorer::RunConfiguration *rc);
|
||||
AndroidRunEnvironmentAspect();
|
||||
|
||||
Utils::Environment baseEnvironment() const override;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *target, Core::Id id)
|
||||
if (qt)
|
||||
env.prependOrSetPath(qt->qmakeProperty("QT_INSTALL_BINS"));
|
||||
};
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(cmakeRunEnvironmentModifier);
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(target, cmakeRunEnvironmentModifier);
|
||||
|
||||
addAspect<ExecutableAspect>();
|
||||
addAspect<ArgumentsAspect>();
|
||||
|
||||
@@ -208,9 +208,8 @@ void DebuggerRunConfigWidget::useMultiProcessToggled(bool on)
|
||||
\class Debugger::DebuggerRunConfigurationAspect
|
||||
*/
|
||||
|
||||
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(
|
||||
RunConfiguration *rc) :
|
||||
IRunConfigurationAspect(rc), m_target(rc->target())
|
||||
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(RunConfiguration *rc)
|
||||
: m_target(rc->target())
|
||||
{
|
||||
setId("DebuggerAspect");
|
||||
setDisplayName(tr("Debugger settings"));
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace Nim {
|
||||
NimRunConfiguration::NimRunConfiguration(Target *target, Core::Id id)
|
||||
: RunConfiguration(target, id)
|
||||
{
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(LocalEnvironmentAspect::BaseEnvironmentModifier());
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>
|
||||
(target, LocalEnvironmentAspect::BaseEnvironmentModifier());
|
||||
|
||||
addAspect<ExecutableAspect>();
|
||||
addAspect<ArgumentsAspect>();
|
||||
|
||||
@@ -87,9 +87,7 @@ private:
|
||||
CustomExecutableDialog::CustomExecutableDialog(RunConfiguration *rc)
|
||||
: QDialog(Core::ICore::dialogParent()),
|
||||
m_rc(rc),
|
||||
m_arguments(rc),
|
||||
m_workingDirectory(rc, rc->extraAspect<EnvironmentAspect>()),
|
||||
m_terminal(rc)
|
||||
m_workingDirectory(rc->extraAspect<EnvironmentAspect>())
|
||||
{
|
||||
auto vbox = new QVBoxLayout(this);
|
||||
vbox->addWidget(new QLabel(tr("Could not find the executable, please specify one.")));
|
||||
@@ -178,7 +176,8 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *targe
|
||||
CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *target, Core::Id id)
|
||||
: RunConfiguration(target, id)
|
||||
{
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(LocalEnvironmentAspect::BaseEnvironmentModifier());
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>
|
||||
(target, LocalEnvironmentAspect::BaseEnvironmentModifier());
|
||||
|
||||
auto exeAspect = addAspect<ExecutableAspect>();
|
||||
exeAspect->setSettingsKey("ProjectExplorer.CustomExecutableRunConfiguration.Executable");
|
||||
|
||||
@@ -39,8 +39,7 @@ namespace ProjectExplorer {
|
||||
// EnvironmentAspect:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
EnvironmentAspect::EnvironmentAspect(RunConfiguration *runConfig) :
|
||||
IRunConfigurationAspect(runConfig)
|
||||
EnvironmentAspect::EnvironmentAspect()
|
||||
{
|
||||
setDisplayName(tr("Run Environment"));
|
||||
setId("EnvironmentAspect");
|
||||
|
||||
@@ -64,7 +64,7 @@ signals:
|
||||
void environmentChanged();
|
||||
|
||||
protected:
|
||||
explicit EnvironmentAspect(RunConfiguration *rc);
|
||||
EnvironmentAspect();
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
|
||||
|
||||
@@ -67,11 +67,10 @@ void LocalEnvironmentAspect::buildEnvironmentHasChanged()
|
||||
emit environmentChanged();
|
||||
}
|
||||
|
||||
LocalEnvironmentAspect::LocalEnvironmentAspect(RunConfiguration *parent,
|
||||
LocalEnvironmentAspect::LocalEnvironmentAspect(Target *target,
|
||||
const BaseEnvironmentModifier &modifier) :
|
||||
EnvironmentAspect(parent),
|
||||
m_baseEnvironmentModifier(modifier),
|
||||
m_target(parent->target())
|
||||
m_target(target)
|
||||
{
|
||||
addPreferredBaseEnvironment(BuildEnvironmentBase, tr("Build Environment"));
|
||||
addSupportedBaseEnvironment(SystemEnvironmentBase, tr("System Environment"));
|
||||
|
||||
@@ -35,7 +35,7 @@ class PROJECTEXPLORER_EXPORT LocalEnvironmentAspect : public EnvironmentAspect
|
||||
|
||||
public:
|
||||
typedef std::function<void(Utils::Environment &)> BaseEnvironmentModifier;
|
||||
LocalEnvironmentAspect(RunConfiguration *parent, const BaseEnvironmentModifier &modifier);
|
||||
LocalEnvironmentAspect(Target *parent, const BaseEnvironmentModifier &modifier);
|
||||
|
||||
Utils::Environment baseEnvironment() const override;
|
||||
|
||||
|
||||
@@ -93,9 +93,7 @@ QWidget *ISettingsAspect::createConfigWidget() const
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
IRunConfigurationAspect::IRunConfigurationAspect(RunConfiguration *runConfig) :
|
||||
m_runConfiguration(runConfig)
|
||||
{ }
|
||||
IRunConfigurationAspect::IRunConfigurationAspect() = default;
|
||||
|
||||
IRunConfigurationAspect::~IRunConfigurationAspect()
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ class PROJECTEXPLORER_EXPORT IRunConfigurationAspect : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit IRunConfigurationAspect(RunConfiguration *runConfig);
|
||||
IRunConfigurationAspect();
|
||||
~IRunConfigurationAspect() override;
|
||||
|
||||
using ConfigWidgetCreator = std::function<QWidget *()>;
|
||||
@@ -132,7 +132,6 @@ public:
|
||||
ISettingsAspect *projectSettings() const { return m_projectSettings; }
|
||||
ISettingsAspect *globalSettings() const { return m_globalSettings; }
|
||||
ISettingsAspect *currentSettings() const;
|
||||
RunConfiguration *runConfiguration() const { return m_runConfiguration; }
|
||||
|
||||
virtual void addToConfigurationLayout(QFormLayout *layout);
|
||||
|
||||
@@ -150,7 +149,6 @@ private:
|
||||
QString m_settingsKey; // Name of data in settings.
|
||||
bool m_useGlobalSettings = false;
|
||||
bool m_visible = true;
|
||||
RunConfiguration *m_runConfiguration = nullptr;
|
||||
ISettingsAspect *m_projectSettings = nullptr; // Owned if present.
|
||||
ISettingsAspect *m_globalSettings = nullptr; // Not owned.
|
||||
ConfigWidgetCreator m_configWidgetCreator;
|
||||
@@ -222,7 +220,7 @@ public:
|
||||
template<class Aspect, typename ...Args>
|
||||
Aspect *addAspect(Args && ...args)
|
||||
{
|
||||
auto aspect = new Aspect(this, args...);
|
||||
auto aspect = new Aspect(args...);
|
||||
m_aspects.append(aspect);
|
||||
return aspect;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,7 @@ namespace ProjectExplorer {
|
||||
\class ProjectExplorer::TerminalAspect
|
||||
*/
|
||||
|
||||
TerminalAspect::TerminalAspect(RunConfiguration *runConfig, bool useTerminal) :
|
||||
IRunConfigurationAspect(runConfig), m_useTerminal(useTerminal)
|
||||
TerminalAspect::TerminalAspect()
|
||||
{
|
||||
setDisplayName(tr("Terminal"));
|
||||
setId("TerminalAspect");
|
||||
@@ -115,10 +114,8 @@ bool TerminalAspect::isUserSet() const
|
||||
\class ProjectExplorer::WorkingDirectoryAspect
|
||||
*/
|
||||
|
||||
WorkingDirectoryAspect::WorkingDirectoryAspect(RunConfiguration *runConfig,
|
||||
EnvironmentAspect *envAspect)
|
||||
: IRunConfigurationAspect(runConfig),
|
||||
m_envAspect(envAspect)
|
||||
WorkingDirectoryAspect::WorkingDirectoryAspect(EnvironmentAspect *envAspect)
|
||||
: m_envAspect(envAspect)
|
||||
{
|
||||
setDisplayName(tr("Working Directory"));
|
||||
setId("WorkingDirectoryAspect");
|
||||
@@ -237,8 +234,7 @@ PathChooser *WorkingDirectoryAspect::pathChooser() const
|
||||
\class ProjectExplorer::ArgumentsAspect
|
||||
*/
|
||||
|
||||
ArgumentsAspect::ArgumentsAspect(RunConfiguration *runConfig)
|
||||
: IRunConfigurationAspect(runConfig)
|
||||
ArgumentsAspect::ArgumentsAspect()
|
||||
{
|
||||
setDisplayName(tr("Arguments"));
|
||||
setId("ArgumentsAspect");
|
||||
@@ -300,10 +296,7 @@ void ArgumentsAspect::addToConfigurationLayout(QFormLayout *layout)
|
||||
\class ProjectExplorer::BaseStringAspect
|
||||
*/
|
||||
|
||||
BaseStringAspect::BaseStringAspect(RunConfiguration *rc)
|
||||
: IRunConfigurationAspect(rc)
|
||||
{
|
||||
}
|
||||
BaseStringAspect::BaseStringAspect() = default;
|
||||
|
||||
BaseStringAspect::~BaseStringAspect()
|
||||
{
|
||||
@@ -486,7 +479,7 @@ void BaseStringAspect::update()
|
||||
void BaseStringAspect::makeCheckable(const QString &checkerLabel, const QString &checkerKey)
|
||||
{
|
||||
QTC_ASSERT(!m_checker, return);
|
||||
m_checker = new BaseBoolAspect(runConfiguration());
|
||||
m_checker = new BaseBoolAspect;
|
||||
m_checker->setLabel(checkerLabel);
|
||||
m_checker->setSettingsKey(checkerKey);
|
||||
|
||||
@@ -500,8 +493,7 @@ void BaseStringAspect::makeCheckable(const QString &checkerLabel, const QString
|
||||
\class ProjectExplorer::ExecutableAspect
|
||||
*/
|
||||
|
||||
ExecutableAspect::ExecutableAspect(RunConfiguration *rc)
|
||||
: IRunConfigurationAspect(rc), m_executable(rc)
|
||||
ExecutableAspect::ExecutableAspect()
|
||||
{
|
||||
setDisplayName(tr("Executable"));
|
||||
setId("ExecutableAspect");
|
||||
@@ -556,7 +548,7 @@ void ExecutableAspect::setDisplayStyle(BaseStringAspect::DisplayStyle style)
|
||||
void ExecutableAspect::makeOverridable(const QString &overridingKey, const QString &useOverridableKey)
|
||||
{
|
||||
QTC_ASSERT(!m_alternativeExecutable, return);
|
||||
m_alternativeExecutable = new BaseStringAspect(runConfiguration());
|
||||
m_alternativeExecutable = new BaseStringAspect;
|
||||
m_alternativeExecutable->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||
m_alternativeExecutable->setLabelText(tr("Alternate executable on device:"));
|
||||
m_alternativeExecutable->setSettingsKey(overridingKey);
|
||||
@@ -619,8 +611,7 @@ void ExecutableAspect::toMap(QVariantMap &map) const
|
||||
\class ProjectExplorer::BaseBoolAspect
|
||||
*/
|
||||
|
||||
BaseBoolAspect::BaseBoolAspect(RunConfiguration *runConfig, const QString &settingsKey)
|
||||
: IRunConfigurationAspect(runConfig)
|
||||
BaseBoolAspect::BaseBoolAspect(const QString &settingsKey)
|
||||
{
|
||||
setSettingsKey(settingsKey);
|
||||
}
|
||||
@@ -670,8 +661,7 @@ void BaseBoolAspect::setLabel(const QString &label)
|
||||
\class ProjectExplorer::UseLibraryPathsAspect
|
||||
*/
|
||||
|
||||
UseLibraryPathsAspect::UseLibraryPathsAspect(RunConfiguration *rc)
|
||||
: BaseBoolAspect(rc)
|
||||
UseLibraryPathsAspect::UseLibraryPathsAspect()
|
||||
{
|
||||
setId("UseLibraryPath");
|
||||
setSettingsKey("RunConfiguration.UseLibrarySearchPath");
|
||||
@@ -688,8 +678,7 @@ UseLibraryPathsAspect::UseLibraryPathsAspect(RunConfiguration *rc)
|
||||
\class ProjectExplorer::UseDyldSuffixAspect
|
||||
*/
|
||||
|
||||
UseDyldSuffixAspect::UseDyldSuffixAspect(RunConfiguration *rc)
|
||||
: BaseBoolAspect(rc)
|
||||
UseDyldSuffixAspect::UseDyldSuffixAspect()
|
||||
{
|
||||
setId("UseDyldSuffix");
|
||||
setSettingsKey("RunConfiguration.UseDyldImageSuffix");
|
||||
|
||||
@@ -48,7 +48,7 @@ class PROJECTEXPLORER_EXPORT TerminalAspect : public IRunConfigurationAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TerminalAspect(RunConfiguration *rc, bool useTerminal = false);
|
||||
TerminalAspect();
|
||||
|
||||
void addToConfigurationLayout(QFormLayout *layout) override;
|
||||
|
||||
@@ -71,8 +71,7 @@ class PROJECTEXPLORER_EXPORT WorkingDirectoryAspect : public IRunConfigurationAs
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WorkingDirectoryAspect(RunConfiguration *runConfig,
|
||||
EnvironmentAspect *envAspect = nullptr);
|
||||
explicit WorkingDirectoryAspect(EnvironmentAspect *envAspect = nullptr);
|
||||
|
||||
void addToConfigurationLayout(QFormLayout *layout) override;
|
||||
|
||||
@@ -101,7 +100,7 @@ class PROJECTEXPLORER_EXPORT ArgumentsAspect : public IRunConfigurationAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ArgumentsAspect(RunConfiguration *runConfig);
|
||||
ArgumentsAspect();
|
||||
|
||||
void addToConfigurationLayout(QFormLayout *layout) override;
|
||||
|
||||
@@ -126,7 +125,7 @@ class PROJECTEXPLORER_EXPORT BaseBoolAspect : public IRunConfigurationAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BaseBoolAspect(RunConfiguration *rc, const QString &settingsKey = QString());
|
||||
explicit BaseBoolAspect(const QString &settingsKey = QString());
|
||||
~BaseBoolAspect() override;
|
||||
|
||||
void addToConfigurationLayout(QFormLayout *layout) override;
|
||||
@@ -150,7 +149,7 @@ class PROJECTEXPLORER_EXPORT UseLibraryPathsAspect : public BaseBoolAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UseLibraryPathsAspect(RunConfiguration *rc);
|
||||
UseLibraryPathsAspect();
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT UseDyldSuffixAspect : public BaseBoolAspect
|
||||
@@ -158,7 +157,7 @@ class PROJECTEXPLORER_EXPORT UseDyldSuffixAspect : public BaseBoolAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UseDyldSuffixAspect(RunConfiguration *rc);
|
||||
UseDyldSuffixAspect();
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT BaseStringAspect : public IRunConfigurationAspect
|
||||
@@ -166,7 +165,7 @@ class PROJECTEXPLORER_EXPORT BaseStringAspect : public IRunConfigurationAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BaseStringAspect(RunConfiguration *rc);
|
||||
BaseStringAspect();
|
||||
~BaseStringAspect() override;
|
||||
|
||||
void addToConfigurationLayout(QFormLayout *layout) override;
|
||||
@@ -221,7 +220,7 @@ class PROJECTEXPLORER_EXPORT ExecutableAspect : public IRunConfigurationAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ExecutableAspect(RunConfiguration *rc);
|
||||
ExecutableAspect();
|
||||
~ExecutableAspect() override;
|
||||
|
||||
Utils::FileName executable() const;
|
||||
@@ -254,7 +253,7 @@ class PROJECTEXPLORER_EXPORT SymbolFileAspect : public BaseStringAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SymbolFileAspect(RunConfiguration *rc) : BaseStringAspect(rc) {}
|
||||
SymbolFileAspect() = default;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -209,7 +209,7 @@ class InterpreterAspect : public BaseStringAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InterpreterAspect(RunConfiguration *rc) : BaseStringAspect(rc) {}
|
||||
InterpreterAspect() = default;
|
||||
};
|
||||
|
||||
class MainScriptAspect : public BaseStringAspect
|
||||
@@ -217,7 +217,7 @@ class MainScriptAspect : public BaseStringAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainScriptAspect(RunConfiguration *rc) : BaseStringAspect(rc) {}
|
||||
MainScriptAspect() = default;
|
||||
};
|
||||
|
||||
class PythonRunConfiguration : public RunConfiguration
|
||||
@@ -262,7 +262,7 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Core::Id id)
|
||||
scriptAspect->setLabelText(tr("Script:"));
|
||||
scriptAspect->setDisplayStyle(BaseStringAspect::LabelDisplay);
|
||||
|
||||
addAspect<LocalEnvironmentAspect>(LocalEnvironmentAspect::BaseEnvironmentModifier());
|
||||
addAspect<LocalEnvironmentAspect>(target, LocalEnvironmentAspect::BaseEnvironmentModifier());
|
||||
addAspect<ArgumentsAspect>();
|
||||
addAspect<TerminalAspect>();
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Internal {
|
||||
QbsRunConfiguration::QbsRunConfiguration(Target *target, Core::Id id)
|
||||
: RunConfiguration(target, id)
|
||||
{
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(target,
|
||||
[this](Environment &env) { addToBaseEnvironment(env); });
|
||||
|
||||
addAspect<ExecutableAspect>();
|
||||
|
||||
@@ -63,7 +63,7 @@ const char PRO_FILE_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.ProFile";
|
||||
DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *target, Core::Id id)
|
||||
: RunConfiguration(target, id)
|
||||
{
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>([this](Environment &env) {
|
||||
auto envAspect = addAspect<LocalEnvironmentAspect>(target, [this](Environment &env) {
|
||||
addToBaseEnvironment(env);
|
||||
});
|
||||
|
||||
|
||||
@@ -34,8 +34,7 @@ namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
QmlProfilerRunConfigurationAspect::QmlProfilerRunConfigurationAspect(
|
||||
ProjectExplorer::RunConfiguration *parent) :
|
||||
ProjectExplorer::IRunConfigurationAspect(parent)
|
||||
ProjectExplorer::RunConfiguration *)
|
||||
{
|
||||
setProjectSettings(new QmlProfilerSettings);
|
||||
setGlobalSettings(QmlProfilerPlugin::globalSettings());
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Internal {
|
||||
class QmlProfilerRunConfigurationAspect : public ProjectExplorer::IRunConfigurationAspect
|
||||
{
|
||||
public:
|
||||
QmlProfilerRunConfigurationAspect(ProjectExplorer::RunConfiguration *parent);
|
||||
QmlProfilerRunConfigurationAspect(ProjectExplorer::RunConfiguration *);
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
||||
@@ -53,8 +53,8 @@ Environment QmlProjectEnvironmentAspect::baseEnvironment() const
|
||||
return env;
|
||||
}
|
||||
|
||||
QmlProjectEnvironmentAspect::QmlProjectEnvironmentAspect(RunConfiguration *rc, Target *target)
|
||||
: EnvironmentAspect(rc), m_target(target)
|
||||
QmlProjectEnvironmentAspect::QmlProjectEnvironmentAspect(Target *target)
|
||||
: m_target(target)
|
||||
{
|
||||
if (DeviceTypeKitInformation::deviceTypeId(target->kit())
|
||||
== Constants::DESKTOP_DEVICE_TYPE)
|
||||
|
||||
@@ -34,8 +34,7 @@ class QmlProjectEnvironmentAspect : public ProjectExplorer::EnvironmentAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QmlProjectEnvironmentAspect(ProjectExplorer::RunConfiguration *rc,
|
||||
ProjectExplorer::Target *target);
|
||||
QmlProjectEnvironmentAspect(ProjectExplorer::Target *target);
|
||||
|
||||
Utils::Environment baseEnvironment() const override;
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ static bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
|
||||
class MainQmlFileAspect : public IRunConfigurationAspect
|
||||
{
|
||||
public:
|
||||
MainQmlFileAspect(RunConfiguration *rc, QmlProject *project);
|
||||
explicit MainQmlFileAspect(QmlProject *project);
|
||||
~MainQmlFileAspect() { delete m_fileListCombo; }
|
||||
|
||||
enum MainScriptSource {
|
||||
@@ -105,8 +105,8 @@ public:
|
||||
QString m_mainScriptFilename;
|
||||
};
|
||||
|
||||
MainQmlFileAspect::MainQmlFileAspect(RunConfiguration *rc, QmlProject *project)
|
||||
: IRunConfigurationAspect(rc), m_project(project)
|
||||
MainQmlFileAspect::MainQmlFileAspect(QmlProject *project)
|
||||
: m_project(project)
|
||||
{
|
||||
m_scriptFile = M_CURRENT_FILE;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class QtLibPathAspect : public ProjectExplorer::BaseStringAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtLibPathAspect(ProjectExplorer::RunConfiguration *rc) : BaseStringAspect(rc) {}
|
||||
QtLibPathAspect() = default;
|
||||
};
|
||||
|
||||
class QnxRunConfiguration : public RemoteLinux::RemoteLinuxRunConfiguration
|
||||
|
||||
@@ -57,7 +57,7 @@ RemoteLinuxCustomRunConfiguration::RemoteLinuxCustomRunConfiguration(Target *tar
|
||||
|
||||
addAspect<ArgumentsAspect>();
|
||||
addAspect<WorkingDirectoryAspect>();
|
||||
addAspect<RemoteLinuxEnvironmentAspect>();
|
||||
addAspect<RemoteLinuxEnvironmentAspect>(target);
|
||||
|
||||
setDefaultDisplayName(runConfigDefaultDisplayName());
|
||||
setOutputFormatter<QtSupport::QtOutputFormatter>();
|
||||
|
||||
@@ -47,14 +47,13 @@ enum BaseEnvironmentBase {
|
||||
};
|
||||
|
||||
|
||||
RemoteLinuxEnvironmentAspect::RemoteLinuxEnvironmentAspect(ProjectExplorer::RunConfiguration *rc) :
|
||||
ProjectExplorer::EnvironmentAspect(rc)
|
||||
RemoteLinuxEnvironmentAspect::RemoteLinuxEnvironmentAspect(ProjectExplorer::Target *target)
|
||||
{
|
||||
addSupportedBaseEnvironment(CleanBaseEnvironment, tr("Clean Environment"));
|
||||
addPreferredBaseEnvironment(RemoteBaseEnvironment, tr("System Environment"));
|
||||
|
||||
setConfigWidgetCreator([this, rc] {
|
||||
return new RemoteLinuxEnvironmentAspectWidget(this, rc->target());
|
||||
setConfigWidgetCreator([this, target] {
|
||||
return new RemoteLinuxEnvironmentAspectWidget(this, target);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class REMOTELINUX_EXPORT RemoteLinuxEnvironmentAspect : public ProjectExplorer::
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RemoteLinuxEnvironmentAspect(ProjectExplorer::RunConfiguration *rc);
|
||||
RemoteLinuxEnvironmentAspect(ProjectExplorer::Target *target);
|
||||
|
||||
Utils::Environment baseEnvironment() const override;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Core::I
|
||||
|
||||
addAspect<ArgumentsAspect>();
|
||||
addAspect<WorkingDirectoryAspect>();
|
||||
addAspect<RemoteLinuxEnvironmentAspect>();
|
||||
addAspect<RemoteLinuxEnvironmentAspect>(target);
|
||||
|
||||
setOutputFormatter<QtSupport::QtOutputFormatter>();
|
||||
|
||||
|
||||
@@ -92,8 +92,7 @@ private:
|
||||
class ValgrindRunConfigurationAspect : public IRunConfigurationAspect
|
||||
{
|
||||
public:
|
||||
ValgrindRunConfigurationAspect(RunConfiguration *parent)
|
||||
: IRunConfigurationAspect(parent)
|
||||
ValgrindRunConfigurationAspect(RunConfiguration *)
|
||||
{
|
||||
setProjectSettings(new ValgrindProjectSettings);
|
||||
setGlobalSettings(ValgrindPlugin::globalSettings());
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace Internal {
|
||||
|
||||
// UninstallAfterStopAspect
|
||||
|
||||
UninstallAfterStopAspect::UninstallAfterStopAspect(RunConfiguration *rc)
|
||||
: BaseBoolAspect(rc, "WinRtRunConfigurationUninstallAfterStopId")
|
||||
UninstallAfterStopAspect::UninstallAfterStopAspect()
|
||||
: BaseBoolAspect("WinRtRunConfigurationUninstallAfterStopId")
|
||||
{
|
||||
setLabel(WinRtRunConfiguration::tr("Uninstall package after application stops"));
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class UninstallAfterStopAspect : public ProjectExplorer::BaseBoolAspect
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UninstallAfterStopAspect(ProjectExplorer::RunConfiguration *rc);
|
||||
UninstallAfterStopAspect();
|
||||
};
|
||||
|
||||
class WinRtRunConfiguration : public ProjectExplorer::RunConfiguration
|
||||
|
||||
Reference in New Issue
Block a user