comparison ui/mainwindow.cpp @ 987:b8ae69bcc540

Use pkexec instead of gksudo. Gksudo was deprecated and replaced by pkexec
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 29 Aug 2014 17:56:06 +0200
parents c80777457133
children 8fb1b912fd8e
comparison
equal deleted inserted replaced
986:66f6361fba1b 987:b8ae69bcc540
335 parameters << "--prefix" << installDir.path(); 335 parameters << "--prefix" << installDir.path();
336 bool sudo_started = false; 336 bool sudo_started = false;
337 bool use_sudo = is_admin() && is_system_install(); 337 bool use_sudo = is_admin() && is_system_install();
338 if (use_sudo) { 338 if (use_sudo) {
339 QStringList sudoPrograms; 339 QStringList sudoPrograms;
340 sudoPrograms << "gksudo" << "kdesudo" << "sudo"; 340 sudoPrograms << "pkexec" << "kdesudo" << "sudo";
341 QStringList sudoParams; 341 QStringList sudoParams;
342 sudoParams << filePath + " " + parameters.join(" "); 342 sudoParams << filePath + " " + parameters.join(" ");
343 343
344 foreach (const QString &sProg, sudoPrograms) { 344 foreach (const QString &sProg, sudoPrograms) {
345 qDebug() << "Starting process " << sProg <<" params: " << sudoParams; 345 qDebug() << "Starting process " << sProg <<" params: " << sudoParams;

http://wald.intevation.org/projects/trustbridge/