Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a7935121 authored by Fabio D'Urso's avatar Fabio D'Urso

Removed TextDocumentGenerator::generalSettingsWidget()

Which is now useless because with the previous patch
TextDocumentGenerator no longer caches the widget.
parent 3dd3a000
......@@ -526,11 +526,6 @@ void TextDocumentGenerator::addPages( KConfigDialog* /*dlg*/ )
return;
}
TextDocumentSettingsWidget* TextDocumentGenerator::generalSettingsWidget()
{
return new TextDocumentSettingsWidget();
}
TextDocumentSettings* TextDocumentGenerator::generalSettings()
{
Q_D( TextDocumentGenerator );
......
......@@ -184,26 +184,12 @@ class OKULAR_EXPORT TextDocumentGenerator : public Generator, public Okular::Con
/// Does nothing by default. You need to reimplement it in your generator
void addPages( KConfigDialog* dlg );
/**
* General settings
*
* This method return TextDocumentSettingsWidget
* that contain default settings for text based documents.
*
* @see generalSettings()
*
* @since 0.17 (KDE 4.11)
*/
TextDocumentSettingsWidget* generalSettingsWidget();
/**
* Config skeleton for TextDocumentSettingsWidget
*
* You must use new construtor to initialize TextDocumentSettings,
* that contain @param configName.
*
* @see generalSettingsWidget()
*
* @since 0.17 (KDE 4.11)
*/
TextDocumentSettings* generalSettings();
......
......@@ -56,8 +56,7 @@ class TextDocumentSettingsPrivate;
* }
* void YourGenerator::addPages( KConfigDialog* dlg )
* {
* Okular::TextDocumentSettingsWidget *widget = generalSettingsWidget();
* widget->setParent( dlg );
* Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
*
* KIntSpinBox *customArgumentWidget = new KIntSpinBox( dlg );
* customArgumentWidget->setObjectName( QString::fromUtf8( "kcfg_CustomArgument" ) );
......@@ -83,6 +82,7 @@ class TextDocumentSettingsPrivate;
class OKULAR_EXPORT TextDocumentSettingsWidget : public QWidget
{
public:
TextDocumentSettingsWidget( QWidget *parent = 0 );
virtual ~TextDocumentSettingsWidget();
void addRow( const QString& labelText, QWidget *widget );
......@@ -92,8 +92,6 @@ class OKULAR_EXPORT TextDocumentSettingsWidget : public QWidget
private:
friend class TextDocumentGenerator;
TextDocumentSettingsWidget( QWidget *parent = 0 );
TextDocumentSettingsWidgetPrivate *d_ptr;
Q_DECLARE_PRIVATE( TextDocumentSettingsWidget )
Q_DISABLE_COPY( TextDocumentSettingsWidget )
......
......@@ -40,8 +40,7 @@ EPubGenerator::EPubGenerator( QObject *parent, const QVariantList &args )
void EPubGenerator::addPages( KConfigDialog* dlg )
{
Okular::TextDocumentSettingsWidget *widget = generalSettingsWidget();
widget->setParent( dlg );
Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
dlg->addPage( widget, generalSettings(), i18n("EPub"), "application-epub+zip", i18n("EPub Backend Configuration") );
}
......@@ -40,8 +40,7 @@ FictionBookGenerator::FictionBookGenerator( QObject *parent, const QVariantList
void FictionBookGenerator::addPages( KConfigDialog* dlg )
{
Okular::TextDocumentSettingsWidget *widget = generalSettingsWidget();
widget->setParent( dlg );
Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
dlg->addPage( widget, generalSettings(), i18n("FictionBook"), "application-x-fictionbook+xml", i18n("FictionBook Backend Configuration") );
}
......@@ -40,8 +40,7 @@ KOOOGenerator::KOOOGenerator( QObject *parent, const QVariantList &args )
void KOOOGenerator::addPages( KConfigDialog* dlg )
{
Okular::TextDocumentSettingsWidget *widget = generalSettingsWidget();
widget->setParent( dlg );
Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
dlg->addPage( widget, generalSettings(), i18n("OpenDocument Text"), "application-vnd.oasis.opendocument.text", i18n("OpenDocument Text Backend Configuration") );
}
......@@ -38,8 +38,7 @@ TxtGenerator::TxtGenerator( QObject *parent, const QVariantList &args )
void TxtGenerator::addPages( KConfigDialog* dlg )
{
Okular::TextDocumentSettingsWidget *widget = generalSettingsWidget();
widget->setParent( dlg );
Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
dlg->addPage( widget, generalSettings(), i18n("Txt"), "text-plain", i18n("Txt Backend Configuration") );
}
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