summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2014-09-17 21:52:14 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2014-09-17 21:52:52 (GMT)
commitdad6936896b4edc549d8ad20a10d3e181ea30b83 (patch)
tree82963ceae74df3099cc21441fe7d8ef13ca40f82
parent61c5bba91945a90f33d9e937b9cbec7bc0f0b81a (diff)
Bring back the txt generator
-rw-r--r--core/generator.cpp5
-rw-r--r--core/generator.h2
-rw-r--r--core/textdocumentgenerator.cpp4
-rw-r--r--core/textdocumentgenerator.h2
-rw-r--r--generators/txt/generator_txt.cpp8
-rw-r--r--generators/txt/generator_txt.h2
6 files changed, 14 insertions, 9 deletions
diff --git a/core/generator.cpp b/core/generator.cpp
index a240f7f..6b0beec 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 d2e7647..0cea00e 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 9fd5ca2..1fcf50e 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 9208241..6fb71f9 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 8a8f0f3..94bf19c 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 04395b3..9a972c0 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;