diff options
| author | Sebastian Trueg <[email protected]> | 2010-02-25 15:41:27 +0000 |
|---|---|---|
| committer | Sebastian Trueg <[email protected]> | 2010-02-25 15:41:27 +0000 |
| commit | 3beca2e7f1fa88015dabaa2a492b4763736cb589 (patch) | |
| tree | 523a5f217c035dc4cfa4370df131933fd1a4cc71 /src/panels/information | |
| parent | af46cf7666564847b6a9a752a11ce55485bff0eb (diff) | |
* No need to reload all tags when one is deleted.
* Use Resource::genericLabel() always for consistency.
svn path=/trunk/KDE/kdebase/apps/; revision=1096036
Diffstat (limited to 'src/panels/information')
| -rw-r--r-- | src/panels/information/kedittagsdialog.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
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<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); |
