removed other instances of QSharedPointer (damn Qt)
CCBUG: 290965
This commit is contained in:
parent
736a54b308
commit
955aa09050
1 changed files with 31 additions and 9 deletions
|
@ -113,16 +113,24 @@ namespace Oxygen
|
|||
{
|
||||
|
||||
// map dialog
|
||||
//QSharedPointer<ExceptionDialog> dialog( new ExceptionDialog( this ) );
|
||||
QPointer<ExceptionDialog> dialog = new ExceptionDialog( this );
|
||||
dialog->setException( _defaultConfiguration );
|
||||
|
||||
// run dialog and check existence
|
||||
if( dialog->exec() == QDialog::Rejected ) return;
|
||||
if( dialog->exec() == QDialog::Rejected )
|
||||
{
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
|
||||
// check dialog
|
||||
if( !dialog ) return;
|
||||
|
||||
// retrieve exception and check
|
||||
Exception exception( dialog->exception() );
|
||||
delete dialog;
|
||||
|
||||
// check exceptions
|
||||
if( !checkException( exception ) ) return;
|
||||
|
||||
// create new item
|
||||
|
@ -136,8 +144,6 @@ namespace Oxygen
|
|||
ui.exceptionListView->selectionModel()->setCurrentIndex( index, QItemSelectionModel::Current|QItemSelectionModel::Rows );
|
||||
}
|
||||
|
||||
delete dialog;
|
||||
|
||||
resizeColumns();
|
||||
emit changed();
|
||||
return;
|
||||
|
@ -155,12 +161,22 @@ namespace Oxygen
|
|||
Exception& exception( model().get( current ) );
|
||||
|
||||
// create dialog
|
||||
QSharedPointer<ExceptionDialog> dialog( new ExceptionDialog( this ) );
|
||||
QPointer<ExceptionDialog> dialog( new ExceptionDialog( this ) );
|
||||
dialog->setException( exception );
|
||||
|
||||
// map dialog
|
||||
if( dialog->exec() == QDialog::Rejected ) return;
|
||||
if( dialog->exec() == QDialog::Rejected )
|
||||
{
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
|
||||
// check dialog
|
||||
if( !dialog ) return;
|
||||
|
||||
// retrieve exception
|
||||
Exception newException = dialog->exception();
|
||||
delete dialog;
|
||||
|
||||
// check if exception was changed
|
||||
if( exception == newException ) return;
|
||||
|
@ -170,6 +186,7 @@ namespace Oxygen
|
|||
|
||||
// asign new exception
|
||||
*&exception = newException;
|
||||
|
||||
resizeColumns();
|
||||
emit changed();
|
||||
return;
|
||||
|
@ -316,11 +333,16 @@ namespace Oxygen
|
|||
{
|
||||
|
||||
KMessageBox::error( this, i18n("Regular Expression syntax is incorrect") );
|
||||
QSharedPointer<ExceptionDialog> dialog( new ExceptionDialog( this ) );
|
||||
QPointer<ExceptionDialog> dialog( new ExceptionDialog( this ) );
|
||||
dialog->setException( exception );
|
||||
if( dialog->exec() == QDialog::Rejected ) return false;
|
||||
exception = dialog->exception();
|
||||
if( dialog->exec() == QDialog::Rejected )
|
||||
{
|
||||
delete dialog;
|
||||
return false;
|
||||
}
|
||||
|
||||
exception = dialog->exception();
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue