forked from qt-creator/qt-creator
Utils: Pass MacroExpander to ArgumentsAspect constructor
In the past we wanted to keep the aspect constructor simple but it turned out that exceptions were needed and accumulating, so those are likely here to stay. By passing also the MacroExpander to the ArgumentsAspect constructor allows other single-purpose warts like the ProjectConfiguration::doPostInit() machinery can be removed. Change-Id: I148b0ca1ab0740270eecd0d3134620de65a86d4f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -98,7 +98,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(Target *target, Id id)
|
||||
m_qmlViewerAspect->setDisplayStyle(StringAspect::LineEditDisplay);
|
||||
m_qmlViewerAspect->setHistoryCompleter("QmlProjectManager.viewer.history");
|
||||
|
||||
auto argumentAspect = addAspect<ArgumentsAspect>();
|
||||
auto argumentAspect = addAspect<ArgumentsAspect>(macroExpander());
|
||||
argumentAspect->setSettingsKey(Constants::QML_VIEWER_ARGUMENTS_KEY);
|
||||
|
||||
setCommandLineGetter([this] {
|
||||
@@ -206,7 +206,7 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
|
||||
QString QmlProjectRunConfiguration::commandLineArguments() const
|
||||
{
|
||||
// arguments in .user file
|
||||
QString args = aspect<ArgumentsAspect>()->arguments(macroExpander());
|
||||
QString args = aspect<ArgumentsAspect>()->arguments();
|
||||
const IDevice::ConstPtr device = DeviceKitAspect::device(kit());
|
||||
const OsType osType = device ? device->osType() : HostOsInfo::hostOs();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user