[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kinit] src/klauncher: Using 'setProcessEnvironment' for QProcess
From:       Thomas Fischer <fischer () unix-ag ! uni-kl ! de>
Date:       2016-11-25 22:08:53
Message-ID: E1cAOft-0001Kc-1x () code ! kde ! org
[Download RAW message or body]

Git commit cc1e04afe759df68e949a206128e167fff49521e by Thomas Fischer.
Committed on 25/11/2016 at 21:33.
Pushed by thomasfischer into branch 'master'.

Using 'setProcessEnvironment' for QProcess

Fixing compilation issue, where function'setEnvironment' was invoked
on a QProces object, passing a QProcessEnvironment variable as
argument.

This was an invalid mixure of the deprecated
'setEnvironment(QStringList)' and the recommended
'setProcessEnvironment(QProcessEnvironment)' functions.

Now, 'setProcessEnvironment' is used.

M  +1    -1    src/klauncher/klauncher.cpp

https://commits.kde.org/kinit/cc1e04afe759df68e949a206128e167fff49521e

diff --git a/src/klauncher/klauncher.cpp b/src/klauncher/klauncher.cpp
index a8819cd..f1727df 100644
--- a/src/klauncher/klauncher.cpp
+++ b/src/klauncher/klauncher.cpp
@@ -559,7 +559,7 @@ KLauncher::requestStart(KLaunchRequest *request)
         const QString envValue = env.mid(pos + 1);
         environment.insert(envVariable, envValue);
     }
-    process->setEnvironment(environment);
+    process->setProcessEnvironment(environment);
 
     QStringList args;
     foreach (const QString &arg, request->arg_list) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic