Commit a8a79368 authored by Albert Astals Cid's avatar Albert Astals Cid

Fix memory leak in text document settings d-pointers

parent 3349c9ff
......@@ -46,6 +46,7 @@ TextDocumentSettingsWidget::~TextDocumentSettingsWidget()
Q_D( TextDocumentSettingsWidget );
delete d->mUi;
delete d;
}
void TextDocumentSettingsWidget::addRow( const QString& labelText, QWidget *widget )
......@@ -62,7 +63,7 @@ void TextDocumentSettingsWidget::addRow( const QString& labelText, QWidget *widg
TextDocumentSettings::TextDocumentSettings( const QString& config, QObject *parent )
: KConfigSkeleton( config, parent )
, d_ptr( new TextDocumentSettingsPrivate() )
, d_ptr( new TextDocumentSettingsPrivate(this) )
{
Q_D( TextDocumentSettings );
......
......@@ -31,9 +31,13 @@ class TextDocumentSettingsWidgetPrivate
Ui_TextDocumentSettings *mUi;
};
class TextDocumentSettingsPrivate
class TextDocumentSettingsPrivate : public QObject
{
public:
TextDocumentSettingsPrivate(QObject *parent)
: QObject(parent)
{}
QFont mFont;
};
......
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