[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeartwork/kscreensaver/kxsconfig
From:       Chris Howells <howells () kde ! org>
Date:       2003-08-26 9:36:36
[Download RAW message or body]

CVS commit by howells: 

This wraps up the fixes for 51804 (wrong lisa run)
Huge thanks Stephan, appreciated!
CCMAIL: 51804-done@bugs.kde.org


  M +12 -3     kxsrun.cpp   1.19


--- kdeartwork/kscreensaver/kxsconfig/kxsrun.cpp  #1.18:1.19
@@ -28,4 +28,5 @@
 #include <qptrlist.h>
 #include <qfile.h>
+#include <qfileinfo.h>
 
 #include <kdebug.h>
@@ -133,7 +134,15 @@ int main(int argc, char *argv[])
 
     // find the xscreensaver executable
-    QString exeFile = filename;
-    if (filename.left(1) != "/")
-        exeFile = KStandardDirs::findExe(filename, XSCREENSAVER_HACKS_DIR);
+    //work around a KStandarDirs::findExe() "feature" where it looks in $KDEDIR/bin \
first no matter what and sometimes finds the wrong executable +    QFileInfo \
checkExe; +    QString saverdir = \
QString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(filename); +    kdDebug() << \
"saverdir is" << saverdir << endl; +    QString exeFile;
+    checkExe.setFile(saverdir);
+    if (checkExe.exists() && checkExe.isExecutable() && checkExe.isFile())
+    {
+        exeFile = saverdir;
+    }
+
 
     if (!exeFile.isEmpty()) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic