]> cloud.milkyroute.net Git - dolphin.git/commitdiff
* No need to reload all tags when one is deleted.
authorSebastian Trueg <sebastian@trueg.de>
Thu, 25 Feb 2010 15:41:27 +0000 (15:41 +0000)
committerSebastian Trueg <sebastian@trueg.de>
Thu, 25 Feb 2010 15:41:27 +0000 (15:41 +0000)
* Use Resource::genericLabel() always for consistency.

svn path=/trunk/KDE/kdebase/apps/; revision=1096036

src/panels/information/kedittagsdialog.cpp

index c155a67e337025fc61dc40573a601134159e2c79..fd637b74a32a06617adb5799873cd3d7a591ec97 100644 (file)
@@ -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<Nepomuk::Tag> 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);