[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kparts/tests
From: David Faure <faure () kde ! org>
Date: 2008-08-16 9:28:48
Message-ID: 1218878928.519208.4099.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 847764 by dfaure:
Port to non-deprecated API (KPluginFactory)
M +7 -8 ghostview.cpp
--- trunk/KDE/kdelibs/kparts/tests/ghostview.cpp #847763:847764
@@ -7,15 +7,14 @@
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kcmdlineargs.h>
-#include <klibloader.h>
+#include <kpluginloader.h>
#include <QtGui/QWidget>
#include <QtCore/QDir>
#include <QtCore/QFile>
-#include <kparts/componentfactory.h>
-
#include "ghostview.h"
+#include <kmimetypetrader.h>
#include <kicon.h>
Shell::Shell()
@@ -34,10 +33,9 @@
connect(paQuit, SIGNAL(triggered()), this, SLOT(close()));
// Try to find a postscript component first
- m_gvpart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( \
"application/postscript",
- \
QString(),
- \
this,
- \
this ); + m_gvpart = \
KMimeTypeTrader::self()->createPartInstanceFromQuery<KParts::ReadOnlyPart>( \
"application/postscript", + \
this, + \
this );
// if we couldn't find a component with the trader, try the
// kghostview library directly. if this ever happens, then something
@@ -45,7 +43,8 @@
// should be picked up by the trader
if (!m_gvpart)
{
- KLibFactory* factory = KLibLoader::self()->factory( "libkghostview" );
+ KPluginLoader loader("libkghostview");
+ KPluginFactory* factory = loader.factory();
if (factory)
{
// Create the part
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic