Commit 6aa12365 authored by Pino Toscano's avatar Pino Toscano

Port the plugin system to the standard KDE factory and loader, getting rid of...

Port the plugin system to the standard KDE factory and loader, getting rid of the custom system okular had so far.
This requires a generator to have a
  MyGenerator(QObject *parent, const QVariantList &args)
constructor in order to be successfully loaded.
The OKULAR_EXPORT_PLUGIN macro was adapted, and the generators to provide it the about data; the protected Generator::setAboutData() is no more needed.

Remove the 'lib' prefix from plugins, unneeded now.

CCMAIL: okular-devel@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=744169
parent 4b1e246e
......@@ -402,36 +402,20 @@ bool DocumentPrivate::openRelativeFile( const QString & fileName )
return true;
}
Generator * DocumentPrivate::loadGeneratorLibrary( const QString& name, const QString& libname )
Generator * DocumentPrivate::loadGeneratorLibrary( const KService::Ptr &service )
{
KLibrary *lib = KLibLoader::self()->library( QFile::encodeName( libname ), QLibrary::ExportExternalSymbolsHint );
if ( !lib )
KPluginFactory *factory = KPluginLoader( service->library() ).factory();
if ( !factory )
{
kWarning(OkularDebug).nospace() << "Could not load '" << libname << "' library.";
kWarning(OkularDebug) << KLibLoader::self()->lastErrorMessage();
emit m_parent->error( i18n( "Could not load the necessary plugin to view the document." ), -1 );
kWarning(OkularDebug).nospace() << "Invalid plugin factory for " << service->library() << "!";
return 0;
}
Generator* (*create_plugin)() = ( Generator* (*)() ) lib->resolveFunction( "create_plugin" );
if ( !create_plugin )
{
kWarning(OkularDebug).nospace() << "Broken generator " << libname << ": missing create_plugin()!";
return 0;
}
Generator * generator = create_plugin();
if ( !generator )
{
kWarning(OkularDebug).nospace() << "Broken generator " << libname << "!";
return 0;
}
GeneratorInfo info;
Generator * generator = factory->create< Okular::Generator >( 0 );
GeneratorInfo info( factory->componentData() );
info.generator = generator;
info.library = lib;
const KComponentData* compData = generator->ownComponentData();
if ( compData && compData->aboutData() )
info.catalogName = compData->aboutData()->catalogName();
m_loadedGenerators.insert( name, info );
if ( info.data.isValid() && info.data.aboutData() )
info.catalogName = info.data.aboutData()->catalogName();
m_loadedGenerators.insert( service->name(), info );
return generator;
}
......@@ -461,7 +445,7 @@ void DocumentPrivate::loadServiceList( const KService::List& offers )
if ( !m_loadedGenerators.isEmpty() && genIt != m_loadedGenerators.end() )
continue;
Generator * g = loadGeneratorLibrary( propName, offers.at(i)->library() );
Generator * g = loadGeneratorLibrary( offers.at(i) );
(void)g;
}
}
......@@ -469,7 +453,6 @@ void DocumentPrivate::loadServiceList( const KService::List& offers )
void DocumentPrivate::unloadGenerator( const GeneratorInfo& info )
{
delete info.generator;
info.library->unload();
}
void DocumentPrivate::cacheExportFormats()
......@@ -1168,7 +1151,7 @@ bool Document::openDocument( const QString & docFile, const KUrl& url, const KMi
}
else
{
d->m_generator = d->loadGeneratorLibrary( propName, offers.at(hRank)->library() );
d->m_generator = d->loadGeneratorLibrary( offers.at(hRank) );
if ( !d->m_generator )
return false;
genIt = d->m_loadedGenerators.constFind( propName );
......@@ -2565,10 +2548,12 @@ const KComponentData* Document::componentData() const
if ( !d->m_generator )
return 0;
const KComponentData* kcd = d->m_generator->ownComponentData();
QHash< QString, GeneratorInfo >::const_iterator genIt = d->m_loadedGenerators.constFind( d->m_generatorName );
Q_ASSERT( genIt != d->m_loadedGenerators.constEnd() );
const KComponentData* kcd = &genIt.value().data;
// empty about data
if ( kcd && kcd->aboutData() && kcd->aboutData()->programName().isEmpty() )
if ( kcd->isValid() && kcd->aboutData() && kcd->aboutData()->programName().isEmpty() )
return 0;
return kcd;
......
......@@ -19,6 +19,7 @@
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include <kcomponentdata.h>
#include <kservicetypetrader.h>
// local includes
......@@ -26,7 +27,6 @@
#include "generator.h"
class QTimer;
class KLibrary;
class KTemporaryFile;
struct AllocatedPixmap;
......@@ -38,12 +38,12 @@ class ConfigInterface;
struct GeneratorInfo
{
GeneratorInfo()
: generator( 0 ), library( 0 ), config( 0 ), configChecked( false )
GeneratorInfo( const KComponentData &_data )
: generator( 0 ), data( _data ), config( 0 ), configChecked( false )
{}
Okular::Generator * generator;
KLibrary * library;
KComponentData data;
QString catalogName;
Okular::ConfigInterface * config;
bool configChecked : 1;
......@@ -83,7 +83,7 @@ class DocumentPrivate
void loadDocumentInfo();
QString giveAbsolutePath( const QString & fileName ) const;
bool openRelativeFile( const QString & fileName );
Generator * loadGeneratorLibrary( const QString& name, const QString& libname );
Generator * loadGeneratorLibrary( const KService::Ptr &service );
void loadAllGeneratorLibraries();
void loadServiceList( const KService::List& offers );
void unloadGenerator( const GeneratorInfo& info );
......
......@@ -138,16 +138,18 @@ QMutex* GeneratorPrivate::threadsLock()
}
Generator::Generator()
: QObject( 0 ), d_ptr( new GeneratorPrivate() )
Generator::Generator( QObject *parent, const QVariantList &args )
: QObject( parent ), d_ptr( new GeneratorPrivate() )
{
d_ptr->q_ptr = this;
Q_UNUSED( args )
}
Generator::Generator( GeneratorPrivate &dd )
: QObject( 0 ), d_ptr( &dd )
Generator::Generator( GeneratorPrivate &dd, QObject *parent, const QVariantList &args )
: QObject( parent ), d_ptr( &dd )
{
d_ptr->q_ptr = this;
Q_UNUSED( args )
}
Generator::~Generator()
......
......@@ -24,12 +24,11 @@
#include <QtCore/QVector>
#include <kmimetype.h>
#include <kpluginfactory.h>
// KDE_EXPORT is correct here - the function needs to be exported every time
#define OKULAR_EXPORT_PLUGIN( classname ) \
extern "C" { \
KDE_EXPORT Okular::Generator* create_plugin() { return new classname(); } \
}
#define OKULAR_EXPORT_PLUGIN( classname, aboutdata ) \
K_PLUGIN_FACTORY( classname ## Factory, registerPlugin< classname >(); ) \
K_EXPORT_PLUGIN( classname ## Factory( aboutdata ) )
class QMutex;
class QPrinter;
......@@ -206,7 +205,7 @@ class OKULAR_EXPORT Generator : public QObject
/**
* Creates a new generator.
*/
Generator();
Generator( QObject *parent, const QVariantList &args );
/**
* Destroys the generator.
......@@ -471,7 +470,7 @@ setAboutData( about );
protected:
/// @cond PRIVATE
Generator( GeneratorPrivate &dd );
Generator( GeneratorPrivate &dd, QObject *parent, const QVariantList &args );
Q_DECLARE_PRIVATE( Generator )
GeneratorPrivate *d_ptr;
......
......@@ -183,8 +183,8 @@ void TextDocumentGeneratorPrivate::generateTitleInfos()
}
}
TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter )
: Okular::Generator( *new TextDocumentGeneratorPrivate( converter ) )
TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter, QObject *parent, const QVariantList &args )
: Okular::Generator( *new TextDocumentGeneratorPrivate( converter ), parent, args )
{
setFeature( TextExtraction );
setFeature( PrintNative );
......
......@@ -125,7 +125,7 @@ class OKULAR_EXPORT TextDocumentGenerator : public Generator
* @note the generator will take ownership of the converter, so you
* don't have to delete it yourself
*/
TextDocumentGenerator( TextDocumentConverter *converter );
TextDocumentGenerator( TextDocumentConverter *converter, QObject *parent, const QVariantList &args );
virtual ~TextDocumentGenerator();
// [INHERITED] load a document and fill up the pagesVector
......
......@@ -25,7 +25,7 @@ set(okularGenerator_chmlib_SRCS
set(okularGenerator_chmlib_PART_SRCS ${chmlib_SRCS} ${okularGenerator_chmlib_SRCS} )
kde4_add_plugin(okularGenerator_chmlib WITH_PREFIX ${okularGenerator_chmlib_PART_SRCS})
kde4_add_plugin(okularGenerator_chmlib ${okularGenerator_chmlib_PART_SRCS})
target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} ${KDE4_KHTML_LIBS} )
......
......@@ -29,14 +29,9 @@
#include "lib/xchmfile.h"
OKULAR_EXPORT_PLUGIN(CHMGenerator)
CHMGenerator::CHMGenerator()
: Okular::Generator()
static KAboutData createAboutData()
{
setFeature( TextExtraction );
KAboutData *about = new KAboutData(
KAboutData aboutData(
"okular_chm",
"okular_chm",
ki18n( "CHM Backend" ),
......@@ -45,8 +40,16 @@ CHMGenerator::CHMGenerator()
KAboutData::License_GPL,
ki18n( "© 2005-2007 Piotr Szymański" )
);
about->addAuthor( ki18n( "Piotr Szymański" ), KLocalizedString(), "niedakh@gmail.com" );
setAboutData( about );
aboutData.addAuthor( ki18n( "Piotr Szymański" ), KLocalizedString(), "niedakh@gmail.com" );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( CHMGenerator, createAboutData() )
CHMGenerator::CHMGenerator( QObject *parent, const QVariantList &args )
: Okular::Generator( parent, args )
{
setFeature( TextExtraction );
m_syncGen=0;
m_file=0;
......
......@@ -28,7 +28,7 @@ class CHMGenerator : public Okular::Generator
{
Q_OBJECT
public:
CHMGenerator();
CHMGenerator( QObject *parent, const QVariantList &args );
~CHMGenerator();
bool loadDocument( const QString & fileName, QVector< Okular::Page * > & pagesVector );
......
......@@ -28,7 +28,7 @@ Comment[zh_CN]=okular 的 Windows HTMLHelp 格式后端
Comment[zh_TW]=okular 的 Windows HTMLHelp 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=application/x-chm;
X-KDE-Library=libokularGenerator_chmlib
X-KDE-Library=okularGenerator_chmlib
X-KDE-Priority=2
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
......@@ -12,7 +12,7 @@ set( okularGenerator_comicbook_PART_SRCS
)
kde4_add_plugin(okularGenerator_comicbook WITH_PREFIX ${okularGenerator_comicbook_PART_SRCS})
kde4_add_plugin(okularGenerator_comicbook ${okularGenerator_comicbook_PART_SRCS})
target_link_libraries(okularGenerator_comicbook okularcore ${KDE4_KDEUI_LIBS} )
......
......@@ -16,10 +16,10 @@
#include <okular/core/page.h>
#include <okular/core/fileprinter.h>
OKULAR_EXPORT_PLUGIN(ComicBookGenerator)
OKULAR_EXPORT_PLUGIN( ComicBookGenerator, "okular_comicbook" )
ComicBookGenerator::ComicBookGenerator()
: Generator()
ComicBookGenerator::ComicBookGenerator( QObject *parent, const QVariantList &args )
: Generator( parent, args )
{
setFeature( Threaded );
setFeature( PrintNative );
......
......@@ -19,7 +19,7 @@ class ComicBookGenerator : public Okular::Generator
Q_OBJECT
public:
ComicBookGenerator();
ComicBookGenerator( QObject *parent, const QVariantList &args );
virtual ~ComicBookGenerator();
// [INHERITED] load a document and fill up the pagesVector
......
......@@ -38,7 +38,7 @@ Comment[zh_CN]=okular 的 Comic book 格式后端
Comment[zh_TW]=okular 的 Comic book 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=application/x-cbz;application/x-cbr;
X-KDE-Library=libokularGenerator_comicbook
X-KDE-Library=okularGenerator_comicbook
X-KDE-Priority=1
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
......@@ -13,7 +13,7 @@ set(okularGenerator_djvu_SRCS
)
kde4_add_plugin(okularGenerator_djvu WITH_PREFIX ${okularGenerator_djvu_SRCS})
kde4_add_plugin(okularGenerator_djvu ${okularGenerator_djvu_SRCS})
target_link_libraries(okularGenerator_djvu okularcore ${DJVULIBRE_LIBRARY} ${KDE4_KDEUI_LIBS} )
......
......@@ -60,18 +60,9 @@ static void recurseCreateTOC( QDomDocument &maindoc, QDomNode &parent, QDomNode
}
}
OKULAR_EXPORT_PLUGIN(DjVuGenerator)
DjVuGenerator::DjVuGenerator()
: Okular::Generator(), m_docInfo( 0 ), m_docSyn( 0 )
static KAboutData createAboutData()
{
setFeature( TextExtraction );
setFeature( Threaded );
setFeature( PrintPostscript );
m_djvu = new KDjVu();
KAboutData *about = new KAboutData(
KAboutData aboutData(
"okular_djvu",
"okular_djvu",
ki18n( "DjVu Backend" ),
......@@ -80,8 +71,20 @@ DjVuGenerator::DjVuGenerator()
KAboutData::License_GPL,
ki18n( "© 2006-2007 Pino Toscano" )
);
about->addAuthor( ki18n( "Pino Toscano" ), KLocalizedString(), "pino@kde.org" );
setAboutData( about );
aboutData.addAuthor( ki18n( "Pino Toscano" ), KLocalizedString(), "pino@kde.org" );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( DjVuGenerator, createAboutData() )
DjVuGenerator::DjVuGenerator( QObject *parent, const QVariantList &args )
: Okular::Generator( parent, args ), m_docInfo( 0 ), m_docSyn( 0 )
{
setFeature( TextExtraction );
setFeature( Threaded );
setFeature( PrintPostscript );
m_djvu = new KDjVu();
}
DjVuGenerator::~DjVuGenerator()
......
......@@ -25,7 +25,7 @@ class DjVuGenerator : public Okular::Generator
{
Q_OBJECT
public:
DjVuGenerator();
DjVuGenerator( QObject *parent, const QVariantList &args );
~DjVuGenerator();
bool loadDocument( const QString & fileName, QVector<Okular::Page*> & pagesVector );
......
......@@ -28,7 +28,7 @@ Comment[zh_CN]=okular 的 Djvu 格式后端
Comment[zh_TW]=okular 的 DjVu 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=image/vnd.djvu;
X-KDE-Library=libokularGenerator_djvu
X-KDE-Library=okularGenerator_djvu
X-KDE-Priority=2
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
......@@ -47,7 +47,7 @@ set(okularGenerator_dvi_SRCS
)
kde4_add_plugin(okularGenerator_dvi WITH_PREFIX ${okularGenerator_dvi_SRCS})
kde4_add_plugin(okularGenerator_dvi ${okularGenerator_dvi_SRCS})
target_link_libraries(okularGenerator_dvi okularcore ${KDE4_KIO_LIBS} ${MATH_LIB} ${QT_QT3SUPPORT_LIBRARY})
if (FREETYPE_FOUND)
......
......@@ -30,13 +30,10 @@
#include <kdebug.h>
#include <klocale.h>
OKULAR_EXPORT_PLUGIN(DviGenerator)
DviGenerator::DviGenerator() : Okular::Generator(),
m_docInfo( 0 ), m_docSynopsis( 0 ), ready( false ), m_dviRenderer( 0 )
static KAboutData createAboutData()
{
// ### TODO fill after the KDE 4.0 unfreeze
KAboutData *about = new KAboutData(
KAboutData aboutData(
"okular_dvi",
"okular_dvi",
KLocalizedString(),
......@@ -45,7 +42,14 @@ DviGenerator::DviGenerator() : Okular::Generator(),
KAboutData::License_GPL,
KLocalizedString()
);
setAboutData( about );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( DviGenerator, createAboutData() )
DviGenerator::DviGenerator( QObject *parent, const QVariantList &args ) : Okular::Generator( parent, args ),
m_docInfo( 0 ), m_docSynopsis( 0 ), ready( false ), m_dviRenderer( 0 )
{
setFeature( TextExtraction );
}
......
......@@ -25,7 +25,7 @@ class DviGenerator : public Okular::Generator
{
Q_OBJECT
public:
DviGenerator();
DviGenerator( QObject *parent, const QVariantList &args );
bool loadDocument( const QString & fileName, QVector< Okular::Page * > & pagesVector );
bool canGeneratePixmap() const;
......
......@@ -28,7 +28,7 @@ Comment[zh_CN]=okular 的 DVI 格式后端
Comment[zh_TW]=okular 的 DVI 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=application/x-dvi;
X-KDE-Library=libokularGenerator_dvi
X-KDE-Library=okularGenerator_dvi
X-KDE-Priority=2
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
......@@ -13,7 +13,7 @@ set(okularGenerator_fb_PART_SRCS
)
kde4_add_plugin(okularGenerator_fb WITH_PREFIX ${okularGenerator_fb_PART_SRCS})
kde4_add_plugin(okularGenerator_fb ${okularGenerator_fb_PART_SRCS})
target_link_libraries(okularGenerator_fb ${POPPLER_LIBRARY} okularcore ${KDE4_KIO_LIBS} ${MATH_LIB} )
......
......@@ -13,13 +13,10 @@
#include <kaboutdata.h>
OKULAR_EXPORT_PLUGIN(FictionBookGenerator)
FictionBookGenerator::FictionBookGenerator()
: Okular::TextDocumentGenerator( new FictionBook::Converter )
static KAboutData createAboutData()
{
// ### TODO fill after the KDE 4.0 unfreeze
KAboutData *about = new KAboutData(
KAboutData aboutData(
"okular_fictionbook",
"okular_fictionbook",
KLocalizedString(),
......@@ -28,5 +25,12 @@ FictionBookGenerator::FictionBookGenerator()
KAboutData::License_GPL,
KLocalizedString()
);
setAboutData( about );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( FictionBookGenerator, createAboutData() )
FictionBookGenerator::FictionBookGenerator( QObject *parent, const QVariantList &args )
: Okular::TextDocumentGenerator( new FictionBook::Converter, parent, args )
{
}
......@@ -15,7 +15,7 @@
class FictionBookGenerator : public Okular::TextDocumentGenerator
{
public:
FictionBookGenerator();
FictionBookGenerator( QObject *parent, const QVariantList &args );
};
#endif
......@@ -48,7 +48,7 @@ Comment[zh_CN]=okular 的 FictionBook 格式后端
Comment[zh_TW]=okular FictionBook 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=application/x-fb;
X-KDE-Library=libokularGenerator_fb
X-KDE-Library=okularGenerator_fb
X-KDE-Priority=1
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
......@@ -8,7 +8,7 @@ include_directories(
set(okularGenerator_kimgio_PART_SRCS generator_kimgio.cpp )
kde4_add_plugin(okularGenerator_kimgio WITH_PREFIX ${okularGenerator_kimgio_PART_SRCS})
kde4_add_plugin(okularGenerator_kimgio ${okularGenerator_kimgio_PART_SRCS})
target_link_libraries(okularGenerator_kimgio okularcore ${KDE4_KDEUI_LIBS} )
......
......@@ -24,17 +24,9 @@
#include <okular/core/page.h>
OKULAR_EXPORT_PLUGIN(KIMGIOGenerator)
KIMGIOGenerator::KIMGIOGenerator()
: Generator()
static KAboutData createAboutData()
{
setFeature( ReadRawData );
setFeature( Threaded );
setFeature( PrintNative );
setFeature( PrintToFile );
KAboutData *about = new KAboutData(
KAboutData aboutData(
"okular_kimgio",
"okular_kimgio",
ki18n( "Image Backend" ),
......@@ -45,10 +37,21 @@ KIMGIOGenerator::KIMGIOGenerator()
"© 2006-2007 Pino Toscano\n"
"© 2006-2007 Tobias Koenig" )
);
about->addAuthor( ki18n( "Albert Astals Cid" ), KLocalizedString(), "aacid@kde.org" );
about->addAuthor( ki18n( "Pino Toscano" ), KLocalizedString(), "pino@kde.org" );
about->addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "tokoe@kde.org" );
setAboutData( about );
aboutData.addAuthor( ki18n( "Albert Astals Cid" ), KLocalizedString(), "aacid@kde.org" );
aboutData.addAuthor( ki18n( "Pino Toscano" ), KLocalizedString(), "pino@kde.org" );
aboutData.addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "tokoe@kde.org" );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( KIMGIOGenerator, createAboutData() )
KIMGIOGenerator::KIMGIOGenerator( QObject *parent, const QVariantList &args )
: Generator( parent, args )
{
setFeature( ReadRawData );
setFeature( Threaded );
setFeature( PrintNative );
setFeature( PrintToFile );
/*
setComponentData( *ownComponentData() );
......
......@@ -20,7 +20,7 @@ class KIMGIOGenerator : public Okular::Generator, public Okular::GuiInterface
Q_OBJECT
Q_INTERFACES( Okular::GuiInterface )
public:
KIMGIOGenerator();
KIMGIOGenerator( QObject *parent, const QVariantList &args );
virtual ~KIMGIOGenerator();
// [INHERITED] load a document and fill up the pagesVector
......
......@@ -51,7 +51,7 @@ Comment[zh_CN]=okular 的图像格式后端
Comment[zh_TW]=okular 影像後端
X-KDE-ServiceTypes=okular/Generator
MimeType=image/bmp;image/x-dds;image/x-eps;image/x-exr;image/gif;image/x-hdr;image/x-ico;image/jpeg2000;image/jpeg;video/x-mng;image/x-portable-bitmap;image/x-pcx;image/x-portable-graymap;image/png;image/x-portable-pixmap;image/x-psd;image/x-rgb;image/x-tga;image/tiff;image/x-xbitmap;image/x-xcf;image/x-xpixmap;
X-KDE-Library=libokularGenerator_kimgio
X-KDE-Library=okularGenerator_kimgio
X-KDE-Priority=1
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
......@@ -16,7 +16,7 @@ set(okularGenerator_ooo_PART_SRCS
)
kde4_add_plugin(okularGenerator_ooo WITH_PREFIX ${okularGenerator_ooo_PART_SRCS})
kde4_add_plugin(okularGenerator_ooo ${okularGenerator_ooo_PART_SRCS})
target_link_libraries(okularGenerator_ooo ${POPPLER_LIBRARY} okularcore ${KDE4_KIO_LIBS} ${MATH_LIB} )
......
......@@ -13,13 +13,10 @@
#include <kaboutdata.h>
OKULAR_EXPORT_PLUGIN(KOOOGenerator)
KOOOGenerator::KOOOGenerator()
: Okular::TextDocumentGenerator( new OOO::Converter )
static KAboutData createAboutData()
{
// ### TODO fill after the KDE 4.0 unfreeze
KAboutData *about = new KAboutData(
KAboutData aboutData(
"okular_ooo",
"okular_ooo",
KLocalizedString(),
......@@ -28,5 +25,12 @@ KOOOGenerator::KOOOGenerator()
KAboutData::License_GPL,
KLocalizedString()
);
setAboutData( about );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( KOOOGenerator, createAboutData() )
KOOOGenerator::KOOOGenerator( QObject *parent, const QVariantList &args )
: Okular::TextDocumentGenerator( new OOO::Converter, parent, args )
{
}