partitionmanager: drop support for kdesu

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-05-15 04:19:29 +00:00
parent 3e76cb74ad
commit a62a837c7f

View 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)