aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-07-30 13:10:38 +0200
committerhjk <hjk@qt.io>2018-08-21 08:00:46 +0000
commit98f3b961c6f0f50612cf94ccac4476a93ded3135 (patch)
tree2e18b3a73c720040cfd5e5af1475ee323cf16185 /src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
parent9f9c72302f60a872d15c5dd1ffa900961dad9014 (diff)
Unify key names for various fields in stored RunConfigurations
This replaces various versions of the key name of the arguments, working directory, use terminal and use dyld image suffix fields by unified versions ("RunConfiguration.Arguments", "RunConfiguration.WorkingDirectory", "RunConfiguration.UseTerminal", "RunConfiguration.UseDyldImageSuffix"). The different names for the fields are technically not needed (as proven by several cases that already now used the same key), partially outdated ("Qt4ProjectManager.MaemoRunConfiguration.Arguments") make RunConfiguration constructors less uniform and more complex than needed. The "RunConfiguration." prefix in the new names is not needed, but used by several other settings, so having it there looks more uniform now. In (the unexpected case) that different keys would ever be necessary, the default key name could still be overridden by using setSettingsKey from user code. Change-Id: Ifb74ad74e0a9c724c8bf5e71e1bb2424d5d1831b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/customexecutablerunconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index b26591ca81..310c5fb0ec 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -86,10 +86,7 @@ private:
CustomExecutableDialog::CustomExecutableDialog(RunConfiguration *rc)
: QDialog(Core::ICore::dialogParent()),
- m_rc(rc),
- m_arguments(rc, rc->extraAspect<ArgumentsAspect>()->settingsKey()),
- m_workingDirectory(rc, rc->extraAspect<WorkingDirectoryAspect>()->settingsKey()),
- m_terminal(rc, rc->extraAspect<TerminalAspect>()->settingsKey())
+ m_rc(rc), m_arguments(rc), m_workingDirectory(rc), m_terminal(rc)
{
auto vbox = new QVBoxLayout(this);
vbox->addWidget(new QLabel(tr("Could not find the executable, please specify one.")));
@@ -189,9 +186,9 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *targe
exeAspect->setEnvironment(envAspect->environment());
addExtraAspect(exeAspect);
- addExtraAspect(new ArgumentsAspect(this, "ProjectExplorer.CustomExecutableRunConfiguration.Arguments"));
- addExtraAspect(new TerminalAspect(this, "ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal"));
- addExtraAspect(new WorkingDirectoryAspect(this, "ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory"));
+ addExtraAspect(new ArgumentsAspect(this));
+ addExtraAspect(new TerminalAspect(this));
+ addExtraAspect(new WorkingDirectoryAspect(this));
connect(envAspect, &EnvironmentAspect::environmentChanged,
this, [exeAspect, envAspect] { exeAspect->setEnvironment(envAspect->environment()); });