diff options
author | Katja Marttila <katja.marttila@qt.io> | 2021-04-20 16:52:07 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2021-04-21 09:32:36 +0300 |
commit | f05ec1bcd90bfb168cef039f319ab79bdbfa0b5b (patch) | |
tree | c96b5a5351346b2152122a878d1faa97c8230e5d /src/libs | |
parent | e98269889b6156b7b027e1848477607b6151dfa4 (diff) |
Fix return value for operations run as detached
Task-number: QTIFW-2210
Change-Id: If02422317039cc7aced3ff175576660cb260a005
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/installer/elevatedexecuteoperation.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/installer/elevatedexecuteoperation.cpp b/src/libs/installer/elevatedexecuteoperation.cpp index f81377ac4..4ca9a8e59 100644 --- a/src/libs/installer/elevatedexecuteoperation.cpp +++ b/src/libs/installer/elevatedexecuteoperation.cpp @@ -151,13 +151,15 @@ int ElevatedExecuteOperation::Private::run(QStringList &arguments, const Operati // unix style: when there's an ampersand after the command, it's started detached if (args.count() >= 2 && args.last() == QLatin1String("&")) { + int returnValue = NoError; args.pop_back(); const bool success = QProcessWrapper::startDetached(args.front(), args.mid(1)); if (!success) { q->setError(UserDefinedError); q->setErrorString(tr("Cannot start detached: \"%1\"").arg(callstr)); + returnValue = Error; } - return success; + return returnValue; } process = new QProcessWrapper(); |