From 736a54b3082266e31b34258f05bbaf7743c5958d Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Mon, 9 Jan 2012 09:42:37 +0100 Subject: [PATCH] Changed QSharedPointer -> QPointer CCBUG: 290965 --- clients/oxygen/config/oxygenexceptionlistwidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clients/oxygen/config/oxygenexceptionlistwidget.cpp b/clients/oxygen/config/oxygenexceptionlistwidget.cpp index 6de5a5e124..d10cfc6aa1 100644 --- a/clients/oxygen/config/oxygenexceptionlistwidget.cpp +++ b/clients/oxygen/config/oxygenexceptionlistwidget.cpp @@ -27,7 +27,7 @@ #include "oxygenexceptionlistwidget.moc" #include "oxygenexceptiondialog.h" -#include +#include #include #include @@ -113,9 +113,13 @@ namespace Oxygen { // map dialog - QSharedPointer dialog( new ExceptionDialog( this ) ); + //QSharedPointer dialog( new ExceptionDialog( this ) ); + QPointer dialog = new ExceptionDialog( this ); dialog->setException( _defaultConfiguration ); + + // run dialog and check existence if( dialog->exec() == QDialog::Rejected ) return; + if( !dialog ) return; // retrieve exception and check Exception exception( dialog->exception() ); @@ -132,6 +136,8 @@ namespace Oxygen ui.exceptionListView->selectionModel()->setCurrentIndex( index, QItemSelectionModel::Current|QItemSelectionModel::Rows ); } + delete dialog; + resizeColumns(); emit changed(); return;