diff options
author | hjk <hjk@qt.io> | 2018-09-04 10:36:44 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-09-04 12:45:21 +0000 |
commit | 4192d7d62fe65b70b9f00f540425ea52bcb68c81 (patch) | |
tree | fcb82f3415530d2cd463ae8a89e1e524f1a12a63 /src | |
parent | 2c17fbe8dd9fdc619efdeceeddf68ad68f6dfcc1 (diff) | |
download | qt-creator-4192d7d62fe65b70b9f00f540425ea52bcb68c81.tar.gz |
ProjectExplorer: Compactify runconfiguration aspect creation
Change-Id: I12394d3df8deb7666be6ac3f112082f915454e82
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src')
17 files changed, 68 insertions, 88 deletions
diff --git a/src/plugins/android/androidrunconfiguration.cpp b/src/plugins/android/androidrunconfiguration.cpp index 9948f69b5d..17cefd1d89 100644 --- a/src/plugins/android/androidrunconfiguration.cpp +++ b/src/plugins/android/androidrunconfiguration.cpp @@ -111,28 +111,25 @@ void BaseStringListAspect::setLabel(const QString &label) AndroidRunConfiguration::AndroidRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - addExtraAspect(new AndroidRunEnvironmentAspect(this)); - addExtraAspect(new ArgumentsAspect(this)); + addAspect<AndroidRunEnvironmentAspect>(); + addAspect<ArgumentsAspect>(); - auto amStartArgsAspect = new BaseStringAspect(this); + auto amStartArgsAspect = addAspect<BaseStringAspect>(); amStartArgsAspect->setId(Constants::ANDROID_AMSTARTARGS); amStartArgsAspect->setSettingsKey("Android.AmStartArgsKey"); amStartArgsAspect->setLabelText(tr("Activity manager start options:")); amStartArgsAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay); amStartArgsAspect->setHistoryCompleter("Android.AmStartArgs.History"); - addExtraAspect(amStartArgsAspect); - auto preStartShellCmdAspect = new BaseStringListAspect(this); + auto preStartShellCmdAspect = addAspect<BaseStringListAspect>(); preStartShellCmdAspect->setId(Constants::ANDROID_PRESTARTSHELLCMDLIST); preStartShellCmdAspect->setSettingsKey("Android.PreStartShellCmdListKey"); preStartShellCmdAspect->setLabel(tr("Shell commands to run on Android device before application launch.")); - addExtraAspect(preStartShellCmdAspect); - auto postStartShellCmdAspect = new BaseStringListAspect(this); + auto postStartShellCmdAspect = addAspect<BaseStringListAspect>(); postStartShellCmdAspect->setId(Constants::ANDROID_POSTFINISHSHELLCMDLIST); postStartShellCmdAspect->setSettingsKey("Android.PostStartShellCmdListKey"); postStartShellCmdAspect->setLabel(tr("Shell commands to run on Android device after application quits.")); - addExtraAspect(postStartShellCmdAspect); setOutputFormatter<QtSupport::QtOutputFormatter>(); connect(target->project(), &Project::parsingFinished, this, [this] { diff --git a/src/plugins/baremetal/baremetalcustomrunconfiguration.cpp b/src/plugins/baremetal/baremetalcustomrunconfiguration.cpp index c184d39bfb..29495ee472 100644 --- a/src/plugins/baremetal/baremetalcustomrunconfiguration.cpp +++ b/src/plugins/baremetal/baremetalcustomrunconfiguration.cpp @@ -41,16 +41,15 @@ namespace Internal { BareMetalCustomRunConfiguration::BareMetalCustomRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto exeAspect = new ExecutableAspect(this); + auto exeAspect = addAspect<ExecutableAspect>(); exeAspect->setSettingsKey("BareMetal.CustomRunConfig.Executable"); exeAspect->setPlaceHolderText(tr("Unknown")); exeAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay); exeAspect->setHistoryCompleter("BareMetal.CustomRunConfig.History"); exeAspect->setExpectedKind(PathChooser::Any); - addExtraAspect(exeAspect); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); setDefaultDisplayName(RunConfigurationFactory::decoratedTargetName(tr("Custom Executable"), target)); } diff --git a/src/plugins/baremetal/baremetalrunconfiguration.cpp b/src/plugins/baremetal/baremetalrunconfiguration.cpp index 6698fc7bbc..8cb2aa3a8c 100644 --- a/src/plugins/baremetal/baremetalrunconfiguration.cpp +++ b/src/plugins/baremetal/baremetalrunconfiguration.cpp @@ -43,13 +43,12 @@ namespace Internal { BareMetalRunConfiguration::BareMetalRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto exeAspect = new ExecutableAspect(this); + auto exeAspect = addAspect<ExecutableAspect>(); exeAspect->setDisplayStyle(BaseStringAspect::LabelDisplay); exeAspect->setPlaceHolderText(tr("Unknown")); - addExtraAspect(exeAspect); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); connect(target, &Target::deploymentDataChanged, this, &BareMetalRunConfiguration::updateTargetInformation); diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index 30945013a9..f27c6156a9 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -53,11 +53,11 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *target, Core::Id id) if (qt) env.prependOrSetPath(qt->qmakeProperty("QT_INSTALL_BINS")); }; - addExtraAspect(new LocalEnvironmentAspect(this, cmakeRunEnvironmentModifier)); - addExtraAspect(new ExecutableAspect(this)); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new TerminalAspect(this)); + addAspect<LocalEnvironmentAspect>(cmakeRunEnvironmentModifier); + addAspect<ExecutableAspect>(); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<TerminalAspect>(); connect(target->project(), &Project::parsingFinished, this, &CMakeRunConfiguration::updateTargetInformation); diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp index 6f0d53684e..0512286d35 100644 --- a/src/plugins/ios/iosrunconfiguration.cpp +++ b/src/plugins/ios/iosrunconfiguration.cpp @@ -97,7 +97,7 @@ private: IosRunConfiguration::IosRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - addExtraAspect(new ArgumentsAspect(this)); + addAspect<ArgumentsAspect>(); setOutputFormatter<QtSupport::QtOutputFormatter>(); connect(DeviceManager::instance(), &DeviceManager::updated, diff --git a/src/plugins/nim/project/nimrunconfiguration.cpp b/src/plugins/nim/project/nimrunconfiguration.cpp index 3a3704322d..216b277126 100644 --- a/src/plugins/nim/project/nimrunconfiguration.cpp +++ b/src/plugins/nim/project/nimrunconfiguration.cpp @@ -44,11 +44,11 @@ namespace Nim { NimRunConfiguration::NimRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - addExtraAspect(new ExecutableAspect(this)); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier())); - addExtraAspect(new TerminalAspect(this)); + addAspect<ExecutableAspect>(); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<LocalEnvironmentAspect>(LocalEnvironmentAspect::BaseEnvironmentModifier()); + addAspect<TerminalAspect>(); setDisplayName(tr("Current Build Target")); setDefaultDisplayName(tr("Current Build Target")); diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp index 42393a23db..708e25477c 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp @@ -175,20 +175,18 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *targe CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto envAspect = new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier()); - addExtraAspect(envAspect); + auto envAspect = addAspect<LocalEnvironmentAspect>(LocalEnvironmentAspect::BaseEnvironmentModifier()); - auto exeAspect = new ExecutableAspect(this); + auto exeAspect = addAspect<ExecutableAspect>(); exeAspect->setSettingsKey("ProjectExplorer.CustomExecutableRunConfiguration.Executable"); exeAspect->setDisplayStyle(BaseStringAspect::PathChooserDisplay); exeAspect->setHistoryCompleter("Qt.CustomExecutable.History"); exeAspect->setExpectedKind(PathChooser::ExistingCommand); exeAspect->setEnvironment(envAspect->environment()); - addExtraAspect(exeAspect); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new TerminalAspect(this)); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<TerminalAspect>(); connect(envAspect, &EnvironmentAspect::environmentChanged, this, [exeAspect, envAspect] { exeAspect->setEnvironment(envAspect->environment()); }); diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 595aa2a024..80db4d1189 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -231,7 +231,7 @@ RunConfiguration::RunConfiguration(Target *target, Core::Id id) [this] { return displayName(); }, false); for (const AspectFactory &factory : theAspectFactories) - addExtraAspect(factory(this)); + m_aspects.append(factory(this)); } RunConfiguration::~RunConfiguration() @@ -280,12 +280,6 @@ void RunConfiguration::addAspectFactory(const AspectFactory &aspectFactory) theAspectFactories.push_back(aspectFactory); } -void RunConfiguration::addExtraAspect(IRunConfigurationAspect *aspect) -{ - if (aspect) - m_aspects += aspect; -} - /*! * Returns the RunConfiguration of the currently active target * of the startup project, if such exists, or \c nullptr otherwise. diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 47cc11ce48..0277abdd22 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -222,7 +222,13 @@ public: // The BuildTargetInfo corresponding to the buildKey. BuildTargetInfo buildTargetInfo() const; - void addExtraAspect(IRunConfigurationAspect *aspect); + template<class Aspect, typename ...Args> + Aspect *addAspect(Args && ...args) + { + auto aspect = new Aspect(this, args...); + m_aspects.append(aspect); + return aspect; + } static RunConfiguration *startupRunConfiguration(); virtual bool canRunForNode(const ProjectExplorer::Node *) const { return false; } diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 2417c3e7b6..e64eebd98b 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -250,23 +250,21 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Core::Id id) const Environment sysEnv = Environment::systemEnvironment(); const QString exec = sysEnv.searchInPath("python").toString(); - auto interpreterAspect = new InterpreterAspect(this); + auto interpreterAspect = addAspect<InterpreterAspect>(); interpreterAspect->setSettingsKey("PythonEditor.RunConfiguation.Interpreter"); interpreterAspect->setLabelText(tr("Interpreter:")); interpreterAspect->setDisplayStyle(BaseStringAspect::PathChooserDisplay); interpreterAspect->setHistoryCompleter("PythonEditor.Interpreter.History"); interpreterAspect->setValue(exec.isEmpty() ? "python" : exec); - addExtraAspect(interpreterAspect); - auto scriptAspect = new MainScriptAspect(this); + auto scriptAspect = addAspect<MainScriptAspect>(); scriptAspect->setSettingsKey("PythonEditor.RunConfiguation.Script"); scriptAspect->setLabelText(tr("Script:")); scriptAspect->setDisplayStyle(BaseStringAspect::LabelDisplay); - addExtraAspect(scriptAspect); - addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier())); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new TerminalAspect(this)); + addAspect<LocalEnvironmentAspect>(LocalEnvironmentAspect::BaseEnvironmentModifier()); + addAspect<ArgumentsAspect>(); + addAspect<TerminalAspect>(); setOutputFormatter<PythonOutputFormatter>(); diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp index beac4f3cdd..ce09c16d78 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp @@ -52,26 +52,23 @@ namespace Internal { QbsRunConfiguration::QbsRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto envAspect = new LocalEnvironmentAspect(this, + auto envAspect = addAspect<LocalEnvironmentAspect>( [](RunConfiguration *rc, Environment &env) { static_cast<QbsRunConfiguration *>(rc)->addToBaseEnvironment(env); }); - addExtraAspect(envAspect); - addExtraAspect(new ExecutableAspect(this)); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new TerminalAspect(this)); + addAspect<ExecutableAspect>(); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<TerminalAspect>(); setOutputFormatter<QtSupport::QtOutputFormatter>(); - auto libAspect = new UseLibraryPathsAspect(this); - addExtraAspect(libAspect); + auto libAspect = addAspect<UseLibraryPathsAspect>(); connect(libAspect, &UseLibraryPathsAspect::changed, envAspect, &EnvironmentAspect::environmentChanged); if (HostOsInfo::isMacHost()) { - auto dyldAspect = new UseDyldSuffixAspect(this); - addExtraAspect(dyldAspect); + auto dyldAspect = addAspect<UseDyldSuffixAspect>(); connect(dyldAspect, &UseDyldSuffixAspect::changed, envAspect, &EnvironmentAspect::environmentChanged); } diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp index 104425d8d2..6ee9d5e4ba 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp @@ -63,26 +63,23 @@ const char PRO_FILE_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.ProFile"; DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto envAspect = new LocalEnvironmentAspect(this, [](RunConfiguration *rc, Environment &env) { + auto envAspect = addAspect<LocalEnvironmentAspect>([](RunConfiguration *rc, Environment &env) { static_cast<DesktopQmakeRunConfiguration *>(rc)->addToBaseEnvironment(env); }); - addExtraAspect(envAspect); - addExtraAspect(new ExecutableAspect(this)); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new TerminalAspect(this)); + addAspect<ExecutableAspect>(); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<TerminalAspect>(); setOutputFormatter<QtSupport::QtOutputFormatter>(); - auto libAspect = new UseLibraryPathsAspect(this); - addExtraAspect(libAspect); + auto libAspect = addAspect<UseLibraryPathsAspect>(); connect(libAspect, &UseLibraryPathsAspect::changed, envAspect, &EnvironmentAspect::environmentChanged); if (HostOsInfo::isMacHost()) { - auto dyldAspect = new UseDyldSuffixAspect(this); - addExtraAspect(dyldAspect); + auto dyldAspect = addAspect<UseDyldSuffixAspect>(); connect(dyldAspect, &UseLibraryPathsAspect::changed, envAspect, &EnvironmentAspect::environmentChanged); } diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 0fd9f17f95..057bb81371 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -55,7 +55,7 @@ const char M_CURRENT_FILE[] = "CurrentFile"; QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id) : RunConfiguration(target, id) { - addExtraAspect(new QmlProjectEnvironmentAspect(this)); + addAspect<QmlProjectEnvironmentAspect>(); setOutputFormatter<QtSupport::QtOutputFormatter>(); // reset default settings in constructor diff --git a/src/plugins/qnx/qnxrunconfiguration.cpp b/src/plugins/qnx/qnxrunconfiguration.cpp index 8b546c6092..2825ec3ac0 100644 --- a/src/plugins/qnx/qnxrunconfiguration.cpp +++ b/src/plugins/qnx/qnxrunconfiguration.cpp @@ -36,10 +36,9 @@ namespace Internal { QnxRunConfiguration::QnxRunConfiguration(Target *target, Core::Id id) : RemoteLinuxRunConfiguration(target, id) { - auto libAspect = new QtLibPathAspect(this); + auto libAspect = addAspect<QtLibPathAspect>(); libAspect->setSettingsKey("Qt4ProjectManager.QnxRunConfiguration.QtLibPath"); libAspect->setLabelText(tr("Path to Qt libraries on device")); - addExtraAspect(libAspect); } Runnable QnxRunConfiguration::runnable() const diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp index 69776d8f7e..232b6e9702 100644 --- a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp @@ -42,24 +42,22 @@ namespace Internal { RemoteLinuxCustomRunConfiguration::RemoteLinuxCustomRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto exeAspect = new ExecutableAspect(this); + auto exeAspect = addAspect<ExecutableAspect>(); exeAspect->setSettingsKey("RemoteLinux.CustomRunConfig.RemoteExecutable"); exeAspect->setLabelText(tr("Remote executable:")); exeAspect->setExecutablePathStyle(OsTypeLinux); exeAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay); exeAspect->setHistoryCompleter("RemoteLinux.CustomExecutable.History"); exeAspect->setExpectedKind(PathChooser::Any); - addExtraAspect(exeAspect); - auto symbolsAspect = new SymbolFileAspect(this); + auto symbolsAspect = addAspect<SymbolFileAspect>(); symbolsAspect->setSettingsKey("RemoteLinux.CustomRunConfig.LocalExecutable"); symbolsAspect->setLabelText(tr("Local executable:")); symbolsAspect->setDisplayStyle(SymbolFileAspect::PathChooserDisplay); - addExtraAspect(symbolsAspect); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new RemoteLinuxEnvironmentAspect(this)); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<RemoteLinuxEnvironmentAspect>(); setDefaultDisplayName(runConfigDefaultDisplayName()); setOutputFormatter<QtSupport::QtOutputFormatter>(); diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp index d5f3681a0c..b03d7dff3b 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp @@ -45,23 +45,21 @@ namespace RemoteLinux { RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { - auto exeAspect = new ExecutableAspect(this); + auto exeAspect = addAspect<ExecutableAspect>(); exeAspect->setLabelText(tr("Executable on device:")); exeAspect->setExecutablePathStyle(OsTypeLinux); exeAspect->setPlaceHolderText(tr("Remote path not set")); exeAspect->makeOverridable("RemoteLinux.RunConfig.AlternateRemoteExecutable", "RemoteLinux.RunConfig.UseAlternateRemoteExecutable"); exeAspect->setHistoryCompleter("RemoteLinux.AlternateExecutable.History"); - addExtraAspect(exeAspect); - auto symbolsAspect = new SymbolFileAspect(this); + auto symbolsAspect = addAspect<SymbolFileAspect>(); symbolsAspect->setLabelText(tr("Executable on host:")); symbolsAspect->setDisplayStyle(SymbolFileAspect::LabelDisplay); - addExtraAspect(symbolsAspect); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new WorkingDirectoryAspect(this)); - addExtraAspect(new RemoteLinuxEnvironmentAspect(this)); + addAspect<ArgumentsAspect>(); + addAspect<WorkingDirectoryAspect>(); + addAspect<RemoteLinuxEnvironmentAspect>(); setOutputFormatter<QtSupport::QtOutputFormatter>(); diff --git a/src/plugins/winrt/winrtrunconfiguration.cpp b/src/plugins/winrt/winrtrunconfiguration.cpp index ea7b458d6a..7a0c5b2525 100644 --- a/src/plugins/winrt/winrtrunconfiguration.cpp +++ b/src/plugins/winrt/winrtrunconfiguration.cpp @@ -56,8 +56,8 @@ WinRtRunConfiguration::WinRtRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { setDisplayName(tr("Run App Package")); - addExtraAspect(new ArgumentsAspect(this)); - addExtraAspect(new UninstallAfterStopAspect(this)); + addAspect<ArgumentsAspect>(); + addAspect<UninstallAfterStopAspect>(); } QWidget *WinRtRunConfiguration::createConfigurationWidget() |