summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Vogt <fabian@ritter-vogt.de>2016-12-27 17:53:40 (GMT)
committerFabian Vogt <fabian@ritter-vogt.de>2016-12-27 17:53:40 (GMT)
commit2db9081b379614ecc19331634d31ca827b9cf9e6 (patch)
tree796e373bde1e201cbba4610f40e69a3b13d22511
parent7ecda403e007a6a52664f4a09385892b96103253 (diff)
Fix arguments when running .desktop files with runservice
Without this patch the command run with runservice has a duplicate first argument as QProcess already prepends the executable name.
-rw-r--r--libdiscover/backends/PackageKitBackend/runservice/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdiscover/backends/PackageKitBackend/runservice/main.cpp b/libdiscover/backends/PackageKitBackend/runservice/main.cpp
index b56917a..693d80c 100644
--- a/libdiscover/backends/PackageKitBackend/runservice/main.cpp
+++ b/libdiscover/backends/PackageKitBackend/runservice/main.cpp
@@ -39,5 +39,7 @@ int main(int argc, char** argv)
QTextStream cerr(stderr);
KIO::DesktopExecParser execParser(_service, {});
- return !QProcess::startDetached(KIO::DesktopExecParser::executableName(_service.exec()), execParser.resultingArguments());
+ auto args = execParser.resultingArguments();
+ const auto execName = args.takeFirst();
+ return !QProcess::startDetached(execName, args);
}