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