Add -- separator when running kdesudo or gksudo

This commit is contained in:
baldurk
2018-10-05 18:17:00 +01:00
parent 046ca0ad12
commit 1bd014247d
+4
View File
@@ -1463,6 +1463,10 @@ bool RunProcessAsAdmin(const QString &fullExecutablePath, const QStringList &par
QProcess *process = new QProcess;
QStringList sudoParams;
// these programs need a -- to indicate the end of their options, before the program
if(sudo == lit("kdesudo") || sudo == lit("gksudo"))
sudoParams << lit("--");
sudoParams << fullExecutablePath;
for(const QString &p : params)
sudoParams << p;