Commit 5149264f authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new kpluginfactory

svn path=/trunk/KDE/kdesdk/cervisia/; revision=714320
parent d3f0e8f1
......@@ -83,10 +83,12 @@ using Cervisia::TagDialog;
#define COMMIT_SPLIT_CHAR '\r'
K_EXPORT_COMPONENT_FACTORY( libcervisiapart, CervisiaFactory )
K_PLUGIN_FACTORY( CervisiaFactory, registerPlugin<CervisiaPart>(); )
K_EXPORT_PLUGIN( CervisiaFactory( "cervisiapart" ) )
CervisiaPart::CervisiaPart( QWidget *parentWidget,
QObject *parent, const QStringList& /*args*/ )
QObject *parent, const QVariantList& /*args*/ )
: KParts::ReadOnlyPart( parent )
, hasRunningJob( false )
, opt_hideFiles( false )
......
......@@ -56,7 +56,7 @@ class CervisiaPart : public KParts::ReadOnlyPart
Q_OBJECT
public:
CervisiaPart( QWidget *parentWidget, QObject *parent, const QStringList& args = QStringList());
CervisiaPart( QWidget *parentWidget, QObject *parent, const QVariantList& args = QVariantList());
virtual ~CervisiaPart();
/**
......@@ -191,8 +191,6 @@ private:
QString m_cvsServiceInterfaceName;
};
typedef KParts::GenericFactory<CervisiaPart> CervisiaFactory;
/**
* A mysterious class, needed to make Konqueror intrgration work.
*/
......
......@@ -41,11 +41,10 @@ CervisiaShell::CervisiaShell( const char *name )
setObjectName( name );
setXMLFile( "cervisiashellui.rc" );
KLibFactory* factory = KLibLoader::self()->factory("libcervisiapart");
KPluginFactory *factory = KPluginLoader("libcervisiapart").factory();
if( factory )
{
m_part = static_cast<KParts::ReadOnlyPart*>(factory->create(this,
"KParts::ReadOnlyPart"));
m_part = factory->create< KParts::ReadOnlyPart >(this);
if( m_part ) {
m_part->setObjectName( "cervisiaview" );
setCentralWidget(m_part->widget());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment