diff --git a/kcmkwin/kwindecoration/configdialog.cpp b/kcmkwin/kwindecoration/configdialog.cpp
index 046290f483..0defa3d9d6 100644
--- a/kcmkwin/kwindecoration/configdialog.cpp
+++ b/kcmkwin/kwindecoration/configdialog.cpp
@@ -22,7 +22,7 @@ along with this program. If not, see .
#include
#include
-#include
+#include
#include
namespace KWin
@@ -67,12 +67,10 @@ KWinDecorationConfigDialog::KWinDecorationConfigDialog( QString deco, const QLis
QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget( m_ui );
- // Use klibloader for library manipulation
- KLibLoader* loader = KLibLoader::self();
- KLibrary* library = loader->library( styleToConfigLib( deco ) );
- if (library != NULL)
+ KLibrary library( styleToConfigLib( deco ) );
+ if (library.load())
{
- KLibrary::void_function_ptr alloc_ptr = library->resolveFunction("allocate_config");
+ KLibrary::void_function_ptr alloc_ptr = library.resolveFunction("allocate_config");
if (alloc_ptr != NULL)
{
allocatePlugin = (QObject* (*)(KConfigGroup& conf, QWidget* parent))alloc_ptr;