forked from qt-creator/qt-creator
PE: Do not clear run cmdline arguments for CMake targets
Amends 5537a102e6
Only set the command line arguments if the "arguments" additional data
is present.
Fixes: QTCREATORBUG-32454
Change-Id: I5b3d5607218d97b184bd361b02b650e2d9863dc0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -144,11 +144,9 @@ void DesktopRunConfiguration::updateTargetInformation()
|
|||||||
aspect<ExecutableAspect>()->setExecutable(bti.targetFilePath);
|
aspect<ExecutableAspect>()->setExecutable(bti.targetFilePath);
|
||||||
aspect<WorkingDirectoryAspect>()->setDefaultWorkingDirectory(bti.workingDirectory);
|
aspect<WorkingDirectoryAspect>()->setDefaultWorkingDirectory(bti.workingDirectory);
|
||||||
|
|
||||||
auto argumentsAsString = [bti]() {
|
const QStringList argumentsList = bti.additionalData.toMap()["arguments"].toStringList();
|
||||||
return CommandLine{"", bti.additionalData.toMap()["arguments"].toStringList()}
|
if (!argumentsList.isEmpty())
|
||||||
.arguments();
|
aspect<ArgumentsAspect>()->setArguments(CommandLine{"", argumentsList}.arguments());
|
||||||
};
|
|
||||||
aspect<ArgumentsAspect>()->setArguments(argumentsAsString());
|
|
||||||
|
|
||||||
emit aspect<EnvironmentAspect>()->environmentChanged();
|
emit aspect<EnvironmentAspect>()->environmentChanged();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user