fix some memory leaks

svn path=/trunk/KDE/kdegraphics/okular/; revision=711280
This commit is contained in:
Pino Toscano 2007-09-11 22:27:39 +00:00
parent 4f98f7b436
commit 83454a5ff3
4 changed files with 15 additions and 10 deletions

View file

@ -23,12 +23,12 @@
PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skeleton )
: KConfigDialog( parent, "preferences", skeleton )
{
m_general = new DlgGeneral(0);
m_performance = new DlgPerformance(0);
m_accessibility = new DlgAccessibility(0);
m_presentation = new DlgPresentation(0);
m_identity = new DlgIdentity(0);
m_debug = new DlgDebug(0);
m_general = new DlgGeneral( this );
m_performance = new DlgPerformance( this );
m_accessibility = new DlgAccessibility( this );
m_presentation = new DlgPresentation( this );
m_identity = new DlgIdentity( this );
m_debug = new DlgDebug( this );
addPage( m_general, i18n("General"), "okular", i18n("General Options") );
addPage( m_accessibility, i18n("Accessibility"), "access", i18n("Accessibility Reading Aids") );

View file

@ -83,7 +83,7 @@ bool GSGenerator::reparseConfig()
void GSGenerator::addPages( KConfigDialog *dlg )
{
Ui_GSSettingsWidget gsw;
QWidget* w = new QWidget(0);
QWidget* w = new QWidget(dlg);
gsw.setupUi(w);
dlg->addPage(w, GSSettings::self(), i18n("Ghostscript"), "kghostview", i18n("Ghostscript backend configuration") );
}

View file

@ -54,7 +54,7 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen
QLabel* tmplabel;
//1. Appearance
//BEGIN tab1
QFrame *page = new QFrame();
QFrame *page = new QFrame( this );
addPage( page, i18n( "&Appearance" ) );
QVBoxLayout * lay = new QVBoxLayout( page );
@ -90,7 +90,7 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen
//END tab1
//BEGIN tab 2
page = new QFrame();
page = new QFrame( this );
addPage( page, i18n( "&General" ) );
// m_tabitem[1]->setIcon( KIcon( "fonts" ) );
QGridLayout * gridlayout = new QGridLayout( page );
@ -114,7 +114,7 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen
gridlayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding ), 3, 0 );
//END tab 2
//BEGIN advance properties:
page = new QFrame();
page = new QFrame( this );
addPage( page, i18n( "&Advanced" ) );
gridlayout = new QGridLayout( page );

View file

@ -298,6 +298,10 @@ class AuthorGroupProxyModel::Private
mGroupByAuthor( false )
{
}
~Private()
{
delete mRoot;
}
AuthorGroupProxyModel *mParent;
AuthorGroupItem *mRoot;
@ -312,6 +316,7 @@ AuthorGroupProxyModel::AuthorGroupProxyModel( QObject *parent )
AuthorGroupProxyModel::~AuthorGroupProxyModel()
{
delete d;
}
int AuthorGroupProxyModel::columnCount( const QModelIndex& ) const