[kgraphviewer-devel] extragear/graphics/kgraphviewer/src

Milian Wolff mail at milianw.de
Mon Oct 18 23:34:46 CEST 2010


SVN commit 1187297 by mwolff:

port away from deprecated KLibLoader to KPluginLoader

 M  +6 -3      kgraphviewer.cpp  


--- trunk/extragear/graphics/kgraphviewer/src/kgraphviewer.cpp #1187296:1187297
@@ -37,7 +37,8 @@
 #include <kstandarddirs.h>
 #include <kstandardaction.h>
 #include <ktoggleaction.h>
-#include <klibloader.h>
+#include <kpluginloader.h>
+#include <kservice.h>
 #include <kmessagebox.h>
 #include <kstatusbar.h>
 #include <klocale.h>
@@ -138,10 +139,12 @@
 void KGraphViewerWindow::openUrl(const KUrl& url)
 {
   kDebug() << url;
-  KLibFactory *factory = KLibLoader::self()->factory("kgraphviewerpart");
+
+  KPluginFactory* factory = KPluginLoader("kgraphviewerpart").factory();
+
   if (factory)
   {
-    KParts::ReadOnlyPart* part = static_cast<KParts::ReadOnlyPart*>(factory->create(this, "kgraphviewerpart"));
+    KParts::ReadOnlyPart* part = factory->create<KParts::ReadOnlyPart>(this);
     KGraphViewer::KGraphViewerInterface* kgv = qobject_cast<KGraphViewer::KGraphViewerInterface*>( part );
     if( ! kgv )
     {


More information about the kgraphviewer-devel mailing list