forked from qt-creator/qt-creator
ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra' to them anymore. Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -193,7 +193,7 @@ RunConfiguration::RunConfiguration(Target *target, Core::Id id)
|
||||
});
|
||||
expander->registerPrefix("CurrentRun:Env", tr("Variables in the current run environment"),
|
||||
[this](const QString &var) {
|
||||
const auto envAspect = extraAspect<EnvironmentAspect>();
|
||||
const auto envAspect = aspect<EnvironmentAspect>();
|
||||
return envAspect ? envAspect->environment().value(var) : QString();
|
||||
});
|
||||
expander->registerVariable(Constants::VAR_CURRENTRUN_NAME,
|
||||
@@ -376,14 +376,14 @@ bool RunConfiguration::fromMap(const QVariantMap &map)
|
||||
Runnable RunConfiguration::runnable() const
|
||||
{
|
||||
Runnable r;
|
||||
if (auto aspect = extraAspect<ExecutableAspect>())
|
||||
r.executable = aspect->executable().toString();
|
||||
if (auto aspect = extraAspect<ArgumentsAspect>())
|
||||
r.commandLineArguments = aspect->arguments(macroExpander());
|
||||
if (auto aspect = extraAspect<WorkingDirectoryAspect>())
|
||||
r.workingDirectory = aspect->workingDirectory(macroExpander()).toString();
|
||||
if (auto aspect = extraAspect<EnvironmentAspect>())
|
||||
r.environment = aspect->environment();
|
||||
if (auto executableAspect = aspect<ExecutableAspect>())
|
||||
r.executable = executableAspect->executable().toString();
|
||||
if (auto argumentsAspect = aspect<ArgumentsAspect>())
|
||||
r.commandLineArguments = argumentsAspect->arguments(macroExpander());
|
||||
if (auto workingDirectoryAspect = aspect<WorkingDirectoryAspect>())
|
||||
r.workingDirectory = workingDirectoryAspect->workingDirectory(macroExpander()).toString();
|
||||
if (auto environmentAspect = aspect<EnvironmentAspect>())
|
||||
r.environment = environmentAspect->environment();
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -1556,7 +1556,7 @@ SimpleTargetRunner::SimpleTargetRunner(RunControl *runControl)
|
||||
m_runnable = runControl->runnable(); // Default value. Can be overridden using setRunnable.
|
||||
m_device = runControl->device(); // Default value. Can be overridden using setDevice.
|
||||
if (auto runConfig = runControl->runConfiguration()) {
|
||||
if (auto terminalAspect = runConfig->extraAspect<TerminalAspect>())
|
||||
if (auto terminalAspect = runConfig->aspect<TerminalAspect>())
|
||||
m_useTerminal = terminalAspect->useTerminal();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user