Revision 575a0f3...

Go back to digest for 27th January 2013

Bug Fixes in KDE Base

Vishesh Handa committed changes in [nepomuk-widgets/KDE/4.10] ui/kedittagsdialog.cpp:

KEditTagsDialog: Use the uri not the label as the unique identifier

The EditTags dialog used the Resource::genericLabel() as the unique
identifier when accessing tags. It would save this genericLabel in the
Qt::UserRole of the QListWidgetItem. This caused the following problems -

* When removing a tag, the tag would be identified via Tag(genericLabel),
this will NOT always give the correct tag back. Mainly cause
Tag(QString) operates on the nao:identifier not the genericLabel.
Quite often the genericLabel and the nao:identifier are the same, so
this wouldn't always be a problem.

By using Tag(genericLabel) we try to delete a tag with nao:identifier
genericLabel, which didn't actually exist.

* When saving tags, it would create each tag with the Tag(genericLabel),
this would normally be fine, unless there exists a tag whose
nao:identifier and genericLabel are not the same. In that case the tag
would be duplicated, and since the user only sees the genericLabel, it
would result in 2 identical tags being shown.

* When saving the tags, it would try and re-create each tag which was
being returned. This resulted in a lot of unnecessary Tag::setLabel
calls which cause unnecessary writes, and slow down the entire
process. This can get especially slow when marking a file with a large
number of tags. We now only set the label of the tags which do not
already exist.

File Changes

Modified 1 files
  • ui/kedittagsdialog.cpp
1 files changed in total