On Friday 23 February 2007, Friedrich W. H. Kossebau wrote: > SVN commit 636591 by kossebau: > > fix: delete dialog always (memleak), use service name for title For this reason I always suggest to create modal dialogs on the stack instead. ServiceConfigDialog dialog( parent, service->name() ); ... > --- branches/work/kdepim-3.5.5+/libkhalkhi/control/kservicelistitem.cpp #636590:636591 > @@ -43,7 +43,7 @@ > { > bool Result = false; > > - ServiceConfigDialog *Dialog = new ServiceConfigDialog( Parent, configLibrary(Service) ); > + ServiceConfigDialog *Dialog = new ServiceConfigDialog( Parent, Service->name() ); > > QWidget *ConfigWidget = > KParts::ComponentFactory::createInstanceFromLibrary( configLibrary(Service).local8Bit().data(), Dialog ); > @@ -54,10 +54,10 @@ > > if( Dialog->exec() == QDialog::Accepted ) > Result = Dialog->isDirty(); > - > - delete Dialog; > } > > + delete Dialog; > + > return Result; > } -- David Faure, faure@kde.org, dfaure@klaralvdalens-datakonsult.se KDE/KOffice developer, Qt consultancy projects Klarälvdalens Datakonsult AB, Platform-independent software solutions