Commit fac55817 authored by Jeremy Whiting's avatar Jeremy Whiting

Use QPointer for dialog we are using with exec().

parent 2eefdc4e
......@@ -23,6 +23,7 @@
// include files for QT
#include <QtCore/QDir>
#include <QtCore/QPointer>
#include <QtGui/QPrintDialog>
#include <QtGui/QPainter>
#include <QtGui/QLayout>
......@@ -812,10 +813,11 @@ void KmagApp::slotEditToolbars()
{
KConfigGroup cg( KGlobal::config(), "MainWindow" );
saveMainWindowSettings( cg );
KEditToolBar dlg( actionCollection() );
connect( &dlg, SIGNAL(newToolBarConfig()), this, SLOT(slotNewToolbarConfig()) );
if ( dlg.exec() )
QPointer<KEditToolBar> dlg = new KEditToolBar( actionCollection() );
connect(dlg, SIGNAL(newToolBarConfig()), this, SLOT(slotNewToolbarConfig()) );
if ( dlg->exec() )
createGUI();
delete dlg;
}
......
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