Cleanup KLibLoader use.
svn path=/trunk/KDE/kdebase/workspace/; revision=1195243
This commit is contained in:
parent
2bd1e7286a
commit
dcded20d84
1 changed files with 7 additions and 4 deletions
|
@ -29,7 +29,7 @@ DEALINGS IN THE SOFTWARE.
|
||||||
#include <kconfig.h>
|
#include <kconfig.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <klibloader.h>
|
#include <klibrary.h>
|
||||||
#include <kconfiggroup.h>
|
#include <kconfiggroup.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -116,14 +116,16 @@ bool KDecorationPlugins::loadPlugin( QString nameStr )
|
||||||
KLibrary *oldLibrary = library;
|
KLibrary *oldLibrary = library;
|
||||||
KDecorationFactory* oldFactory = fact;
|
KDecorationFactory* oldFactory = fact;
|
||||||
|
|
||||||
QString path = KLibLoader::findLibrary(nameStr);
|
KLibrary libToFind(nameStr);
|
||||||
|
QString path = libToFind.fileName();
|
||||||
kDebug(1212) << "kwin : path " << path << " for " << nameStr;
|
kDebug(1212) << "kwin : path " << path << " for " << nameStr;
|
||||||
|
|
||||||
// If the plugin was not found, try to find the default
|
// If the plugin was not found, try to find the default
|
||||||
if (path.isEmpty())
|
if (path.isEmpty())
|
||||||
{
|
{
|
||||||
nameStr = defaultPlugin;
|
nameStr = defaultPlugin;
|
||||||
path = KLibLoader::findLibrary(nameStr);
|
KLibrary libToFind(nameStr);
|
||||||
|
path = libToFind.fileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no library was found, exit kwin with an error message
|
// If no library was found, exit kwin with an error message
|
||||||
|
@ -148,7 +150,8 @@ trydefaultlib:
|
||||||
nameStr = defaultPlugin;
|
nameStr = defaultPlugin;
|
||||||
if ( pluginStr == nameStr )
|
if ( pluginStr == nameStr )
|
||||||
return true;
|
return true;
|
||||||
path = KLibLoader::findLibrary(nameStr);
|
KLibrary libToFind(nameStr);
|
||||||
|
path = libToFind.fileName();
|
||||||
if (!path.isEmpty())
|
if (!path.isEmpty())
|
||||||
library = new KLibrary(path);
|
library = new KLibrary(path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue