From: Sebastian Trueg Date: Thu, 25 Feb 2010 15:41:27 +0000 (+0000) Subject: * No need to reload all tags when one is deleted. X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/3beca2e7f1fa88015dabaa2a492b4763736cb589 * No need to reload all tags when one is deleted. * Use Resource::genericLabel() always for consistency. svn path=/trunk/KDE/kdebase/apps/; revision=1096036 --- diff --git a/src/panels/information/kedittagsdialog.cpp b/src/panels/information/kedittagsdialog.cpp index c155a67e3..fd637b74a 100644 --- a/src/panels/information/kedittagsdialog.cpp +++ b/src/panels/information/kedittagsdialog.cpp @@ -213,12 +213,8 @@ void KEditTagsDialog::deleteTag() Nepomuk::Tag tag(label); tag.remove(); - // clear list and reload it - for (int i = m_tagsList->count() - 1; i >= 0; --i) { - QListWidgetItem* item = m_tagsList->takeItem(i); - delete item; - } - loadTags(); + delete m_deleteCandidate; + m_deleteCandidate = 0; } } @@ -228,7 +224,7 @@ void KEditTagsDialog::loadTags() // that have been passed to the KEditTagsDialog const QList tags = Nepomuk::Tag::allTags(); foreach (const Nepomuk::Tag& tag, tags) { - const QString label = tag.label(); + const QString label = tag.genericLabel(); QListWidgetItem* item = new QListWidgetItem(label, m_tagsList); item->setData(Qt::UserRole, label);