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

List:       kde-commits
Subject:    KDE/kdelibs/kinit
From:       Kevin Ottens <ervin () kde ! org>
Date:       2010-11-04 8:13:34
Message-ID: 20101104081334.5B759AC89B () svn ! kde ! org
[Download RAW message or body]

SVN commit 1192869 by ervin:

Don't use deprecated symbols like KLibLoader. For lib loading use the
private findLibrary() from kdecore instead.


 M  +4 -3      kinit.cpp  
 M  +4 -2      klauncher.cpp  


--- trunk/KDE/kdelibs/kinit/kinit.cpp #1192868:1192869
@@ -59,7 +59,6 @@
 #include <kglobalsettings.h>
 #include <kglobal.h>
 #include <kconfig.h>
-#include <klibloader.h>
 #include <kapplication.h>
 #include <klocale.h>
 #include <kdebug.h>
@@ -465,6 +464,8 @@
 }
 #endif
 
+extern KDECORE_EXPORT QString findLibrary(const QString &name, const KComponentData &cData);
+
 static pid_t launch(int argc, const char *_name, const char *args,
                     const char *cwd=0, int envc=0, const char *envs=0,
                     bool reset_env = false,
@@ -481,9 +482,9 @@
         name = _name;
         lib = QFile::decodeName(name);
         exec = name;
-        libpath = KLibLoader::findLibrary( QLatin1String("libkdeinit4_") + lib, *s_instance);
+        libpath = ::findLibrary( QLatin1String("libkdeinit4_") + lib, *s_instance);
         if( libpath.isEmpty())
-            libpath = KLibLoader::findLibrary(lib, *s_instance);
+            libpath = ::findLibrary(lib, *s_instance);
         execpath = execpath_avoid_loops(exec, envc, envs, avoid_loops);
     } else {
         name = _name;
--- trunk/KDE/kdelibs/kinit/klauncher.cpp #1192868:1192869
@@ -42,7 +42,6 @@
 #include <kconfig.h>
 #include <kdebug.h>
 #include <kde_file.h>
-#include <klibloader.h>
 #include <klocale.h>
 #include <kprotocolmanager.h>
 #include <kprotocolinfo.h>
@@ -729,7 +728,9 @@
 {
    KService::Ptr service;
    // Find service
+#ifndef KDE_NO_DEPRECATED
    service = KService::serviceByName(serviceName);
+#endif
    if (!service)
    {
       requestResult.result = ENOENT;
@@ -1075,6 +1076,7 @@
     return 0;
 }
 
+extern KDECORE_EXPORT QString findLibrary(const QString &name, const KComponentData &cData);
 
 pid_t
 KLauncher::requestSlave(const QString &protocol,
@@ -1156,7 +1158,7 @@
     }
     if (mSlaveValgrind == arg1)
     {
-       arg_list.prepend(KLibLoader::findLibrary(name));
+       arg_list.prepend(::findLibrary(name, KGlobal::mainComponent()));
        arg_list.prepend(KStandardDirs::locate("exe", QString::fromLatin1("kioslave")));
        name = QString::fromLatin1("valgrind");
        if (!mSlaveValgrindSkin.isEmpty()) {
[prev in list] [next in list] [prev in thread] [next in thread] 

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