diff options
| author | Peter Penz <[email protected]> | 2009-05-26 18:24:23 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-05-26 18:24:23 +0000 |
| commit | c848b945d44b3621d6418e6589ea5792003fa3c9 (patch) | |
| tree | f08c03b4df8d135cfdbb34d205d6e184d57cb562 /src/panels/information | |
| parent | 13b535993e224f6150fc2bb90928a37b6a8078d2 (diff) | |
fixed krazy issues (see http://www.kdedevelopers.org/node/3919)
svn path=/trunk/KDE/kdebase/apps/; revision=973269
Diffstat (limited to 'src/panels/information')
| -rw-r--r-- | src/panels/information/newtagdialog.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
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<NewTagDialog> 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(); } } |
