KDE/kdebindings/generator

View: New views
1 Messages — Rating Filter:   Alert me  

KDE/kdebindings/generator

by Bugzilla from kde@arnorehn.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

SVN commit 1044013 by arnorehn:

First try to load plugins from the executable directory.
Thanks to urkud for that patch!

CCMAIL: kde-bindings@...



 M  +8 -2      main.cpp  


--- trunk/KDE/kdebindings/generator/main.cpp #1044012:1044013
@@ -158,10 +158,16 @@
     } else {
         qWarning() << "Couldn't find config file" << configFile.filePath();
     }
-    
-    QLibrary lib("generator_" + generator);
+
+    // first try to load plugins from the executable's directory
+    QLibrary lib(app.applicationDirPath() + "/generator_" + generator);
     lib.load();
     if (!lib.isLoaded()) {
+        lib.unload();
+        lib.setFileName("generator_" + generator);
+        lib.load();
+    }
+    if (!lib.isLoaded()) {
         qCritical() << lib.errorString();
         return EXIT_FAILURE;
     }
_______________________________________________
Kde-bindings mailing list
Kde-bindings@...
https://mail.kde.org/mailman/listinfo/kde-bindings