OSDN Git Service

partitionmanager: use KStandardDirs::findExe() to lookup executables
authorIvailo Monev <xakepa10@gmail.com>
Tue, 15 Jun 2021 02:28:10 +0000 (05:28 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 15 Jun 2021 02:28:43 +0000 (05:28 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
partitionmanager/src/util/helpers.cpp

index 8af94ec..f7a29b9 100644 (file)
@@ -58,13 +58,12 @@ void registerMetaTypes()
 
 static QString suCommand()
 {
-       KStandardDirs d;
        const char* candidates[] = { "kdesudo", "gksudo", "gksu" };
        QString rval;
 
        for (quint32 i = 0; i < sizeof(candidates) / sizeof(candidates[0]); i++)
        {
-               rval = d.locate("exe", candidates[i]);
+               rval = KStandardDirs::findExe(candidates[i]);
                if (QFileInfo(rval).isExecutable())
                        return rval;
        }