diff --git a/core/generator.cpp b/core/generator.cpp index a240f7f3d..6b0beece9 100644 --- a/core/generator.cpp +++ b/core/generator.cpp @@ -164,10 +164,11 @@ Generator::Generator(QObject* parent, const QVariantList&) d_ptr->q_ptr = this; } -Generator::Generator( GeneratorPrivate &dd ) - : 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() diff --git a/core/generator.h b/core/generator.h index d2e7647b3..0cea00ea6 100644 --- a/core/generator.h +++ b/core/generator.h @@ -554,7 +554,7 @@ class OKULAR_EXPORT Generator : public QObject protected: /// @cond PRIVATE - Generator(GeneratorPrivate &dd); + Generator(GeneratorPrivate &dd, QObject *parent, const QVariantList &args); Q_DECLARE_PRIVATE( Generator ) GeneratorPrivate *d_ptr; diff --git a/core/textdocumentgenerator.cpp b/core/textdocumentgenerator.cpp index 9fd5ca26f..1fcf50e8a 100644 --- a/core/textdocumentgenerator.cpp +++ b/core/textdocumentgenerator.cpp @@ -272,8 +272,8 @@ void TextDocumentGeneratorPrivate::initializeGenerator() q, SIGNAL(notice(QString,int)) ); } -TextDocumentGenerator::TextDocumentGenerator( TextDocumentConverter *converter, const QString& configName ) - : Okular::Generator( *new TextDocumentGeneratorPrivate( converter ) ) +TextDocumentGenerator::TextDocumentGenerator(TextDocumentConverter *converter, const QString& configName , QObject *parent, const QVariantList &args) + : Okular::Generator( *new TextDocumentGeneratorPrivate( converter ), parent, args ) { Q_D( TextDocumentGenerator ); d->mGeneralSettings = new TextDocumentSettings( configName, this ); diff --git a/core/textdocumentgenerator.h b/core/textdocumentgenerator.h index 9208241bf..6fb71f913 100644 --- a/core/textdocumentgenerator.h +++ b/core/textdocumentgenerator.h @@ -169,7 +169,7 @@ class OKULAR_EXPORT TextDocumentGenerator : public Generator, public Okular::Con * don't have to delete it yourself * @since 0.17 (KDE 4.11) */ - TextDocumentGenerator(TextDocumentConverter *converter, const QString& configName); + TextDocumentGenerator(TextDocumentConverter *converter, const QString& configName, QObject *parent, const QVariantList &args); virtual ~TextDocumentGenerator(); diff --git a/generators/txt/generator_txt.cpp b/generators/txt/generator_txt.cpp index 8a8f0f3df..94bf19ce7 100644 --- a/generators/txt/generator_txt.cpp +++ b/generators/txt/generator_txt.cpp @@ -29,8 +29,10 @@ static KAboutData createAboutData() return aboutData; } -TxtGenerator::TxtGenerator() - : Okular::TextDocumentGenerator( new Txt::Converter, "okular_txt_generator_settings" ) +OKULAR_EXPORT_PLUGIN(TxtGenerator, createAboutData()) + +TxtGenerator::TxtGenerator(QObject *parent, const QVariantList &args) + : Okular::TextDocumentGenerator(new Txt::Converter, "okular_txt_generator_settings" , parent, args) { } @@ -40,3 +42,5 @@ void TxtGenerator::addPages( KConfigDialog* dlg ) dlg->addPage( widget, generalSettings(), i18n("Txt"), "text-plain", i18n("Txt Backend Configuration") ); } + +#include "generator_txt.moc" diff --git a/generators/txt/generator_txt.h b/generators/txt/generator_txt.h index 04395b3b5..9a972c07e 100644 --- a/generators/txt/generator_txt.h +++ b/generators/txt/generator_txt.h @@ -19,7 +19,7 @@ class TxtGenerator : public Okular::TextDocumentGenerator Q_OBJECT public: - TxtGenerator(); + TxtGenerator(QObject *parent, const QVariantList &args); ~TxtGenerator() {} void addPages( KConfigDialog* dlg ) Q_DECL_OVERRIDE;