aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-09-04 10:36:44 +0200
committerhjk <hjk@qt.io>2018-09-04 12:45:21 +0000
commit4192d7d62fe65b70b9f00f540425ea52bcb68c81 (patch)
treefcb82f3415530d2cd463ae8a89e1e524f1a12a63 /src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp
parent2c17fbe8dd9fdc619efdeceeddf68ad68f6dfcc1 (diff)
ProjectExplorer: Compactify runconfiguration aspect creation
Change-Id: I12394d3df8deb7666be6ac3f112082f915454e82 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxcustomrunconfiguration.cpp
index 69776d8f7e3..232b6e97024 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>();