From c848b945d44b3621d6418e6589ea5792003fa3c9 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 26 May 2009 18:24:23 +0000 Subject: fixed krazy issues (see http://www.kdedevelopers.org/node/3919) svn path=/trunk/KDE/kdebase/apps/; revision=973269 --- src/panels/information/newtagdialog.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/panels/information') diff --git a/src/panels/information/newtagdialog.cpp b/src/panels/information/newtagdialog.cpp index 8785d578c..05189ea48 100644 --- a/src/panels/information/newtagdialog.cpp +++ b/src/panels/information/newtagdialog.cpp @@ -64,17 +64,18 @@ void NewTagDialog::slotLabelChanged( const QString& text ) Nepomuk::Tag NewTagDialog::createTag( QWidget* parent ) { - NewTagDialog dlg( parent ); - dlg.m_labelTitle->setText( i18nc( "@title:window", "Create New Tag" ) ); - dlg.m_labelTitle->setComment( i18nc( "@title:window subtitle to previous message", "with optional icon and description" ) ); - dlg.m_labelTitle->setPixmap( KIcon( "nepomuk" ).pixmap( 32, 32 ) ); + QPointer dlg = new NewTagDialog( parent ); + dlg->m_labelTitle->setText( i18nc( "@title:window", "Create New Tag" ) ); + dlg->m_labelTitle->setComment( i18nc( "@title:window subtitle to previous message", "with optional icon and description" ) ); + dlg->m_labelTitle->setPixmap( KIcon( "nepomuk" ).pixmap( 32, 32 ) ); - dlg.m_editTagLabel->setFocus(); + dlg->m_editTagLabel->setFocus(); - if ( dlg.exec() ) { - QString name = dlg.m_editTagLabel->text(); - QString comment = dlg.m_editTagComment->text(); - QString icon = dlg.m_buttonTagIcon->icon(); + if ( dlg->exec() ) { + QString name = dlg->m_editTagLabel->text(); + QString comment = dlg->m_editTagComment->text(); + QString icon = dlg->m_buttonTagIcon->icon(); + delete dlg; Nepomuk::Tag newTag( name ); newTag.setLabel( name ); @@ -88,6 +89,7 @@ Nepomuk::Tag NewTagDialog::createTag( QWidget* parent ) return newTag; } else { + delete dlg; return Nepomuk::Tag(); } } -- cgit v1.3