Bring back the txt generator

frameworks
Frederik Gladhorn 12 years ago
parent 61c5bba919
commit dad6936896
  1. 5
      core/generator.cpp
  2. 2
      core/generator.h
  3. 4
      core/textdocumentgenerator.cpp
  4. 2
      core/textdocumentgenerator.h
  5. 8
      generators/txt/generator_txt.cpp
  6. 2
      generators/txt/generator_txt.h

@ -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()

@ -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;

@ -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 );

@ -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();

@ -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"

@ -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;

Loading…
Cancel
Save