OSDN Git Service

partitionmanager: drop support for kdesu
authorIvailo Monev <xakepa10@gmail.com>
Sun, 15 May 2016 04:19:29 +0000 (04:19 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 15 May 2016 04:19:29 +0000 (04:19 +0000)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
partitionmanager/src/util/helpers.cpp

index f8d9520..8af94ec 100644 (file)
@@ -59,7 +59,7 @@ void registerMetaTypes()
 static QString suCommand()
 {
        KStandardDirs d;
-       const char* candidates[] = { "kdesu", "kdesudo", "gksudo", "gksu" };
+       const char* candidates[] = { "kdesudo", "gksudo", "gksu" };
        QString rval;
 
        for (quint32 i = 0; i < sizeof(candidates) / sizeof(candidates[0]); i++)
@@ -86,12 +86,6 @@ bool checkPermissions()
 
                        const QString suCmd = suCommand();
 
-                       // kdesu broke backward compatibility at some point and now only works with "-c";
-                       // kdesudo accepts either (with or without "-c"), but the gk* helpers only work
-                       // without. kdesu maintainers won't fix their app, so we need to work around that here.
-                       if (suCmd.indexOf("kdesu") != -1)
-                               argList << "-c";
-
                        argList << args->allArguments().join(" ") + " --dontsu";
 
                        if (QProcess::execute(suCmd, argList) == 0)