forked from qt-creator/qt-creator
QmakeProjectManager: Remove one use of ProcessArgs::ConstArgIterator
The code is effectively only called from the CocoPlugin and was originally copied from QMakeStep::parserArgument() where it is used to hide potentially syntactically wrong/unexpanded items from the (anyway imprecise) internal .pro parser. Using the expanded value is simpler and has about the same level of incorrectness in a get/set roundtrip: Previously e.g. arguments provided by macros were entirely dropped, now they can get replaced by a fixed expansion. Both cases only affect complex setups of the qmake step's "Additional arguments" case. Change-Id: I9307371b5ca88415b0424077ceeaa4dc80f86afe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -418,16 +418,8 @@ QStringList QmakeBuildConfiguration::initialArgs() const
|
|||||||
{
|
{
|
||||||
if (BuildStepList *buildSteps = this->buildSteps()) {
|
if (BuildStepList *buildSteps = this->buildSteps()) {
|
||||||
if (auto qmakeStep = buildSteps->firstOfType<QmakeProjectManager::QMakeStep>()) {
|
if (auto qmakeStep = buildSteps->firstOfType<QmakeProjectManager::QMakeStep>()) {
|
||||||
QString arg = qmakeStep->userArguments.unexpandedArguments();
|
return ProcessArgs::splitArgs(qmakeStep->userArguments.arguments(),
|
||||||
ProcessArgs::ConstArgIterator it{arg};
|
project()->projectFilePath().osType());
|
||||||
QStringList result;
|
|
||||||
|
|
||||||
while (it.next()) {
|
|
||||||
if (it.isSimple())
|
|
||||||
result << it.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
Reference in New Issue
Block a user