fix: error handling recognized args

Recognized args should be removed from exec args when there are no
actual contents. instead of being replaced by "".

Log: fix error handling recognized args
This commit is contained in:
wangyixue 2023-04-25 17:35:53 +08:00 committed by zccrs
parent 0ffe1d4b2d
commit 233cc0db3d

View File

@ -661,10 +661,8 @@ void StartManager::handleRecognizeArgs(QStringList &exeArgs, QStringList files)
// > codes must be removed from the command line and ignored. // > codes must be removed from the command line and ignored.
if (files.isEmpty()) { if (files.isEmpty()) {
for (QString &exeArg: exeArgs) {
for (const QString &arg : argList) { for (const QString &arg : argList) {
exeArg.replace(arg, ""); exeArgs.removeAll(arg);
}
} }
return; return;
} }