Summary: | tag is duplicated when assigned to another file | ||
---|---|---|---|
Product: | [Unmaintained] nepomuk | Reporter: | Aurelien Gateau <agateau> |
Component: | general | Assignee: | Nepomuk Bugs Coordination <nepomuk-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | francesco.cecconi, hrvoje.senjan, nepomuk-bugs, sven.burmeister |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/nepomuk-widgets/575a0f3443816231a57a96613b415b5f4f515157 | Version Fixed In: | 4.10 |
Sentry Crash Report: |
Description
Aurelien Gateau
2013-01-04 15:07:50 UTC
Seems to work with 4.10 RC2. This is fixed in 4.10 rc2. That(In reply to comment #0) > - create two files, t1 and t2 > - select t1, open the tag edit dialog > - create a new tag named "test" > - select t2, open the tag edit dialog > - tick the checkbox for the "test" tag > - open the tag edit dialog again: there are now two entries named "test" That used to be the case few days ago, but i can't no longer reproduce the issue with current master (nepomuk-core/widgets, kde-baseapps, etc) (In reply to comment #3) > That(In reply to comment #0) > > - create two files, t1 and t2 > > - select t1, open the tag edit dialog > > - create a new tag named "test" > > - select t2, open the tag edit dialog > > - tick the checkbox for the "test" tag > > - open the tag edit dialog again: there are now two entries named "test" > > That used to be the case few days ago, but i can't no longer reproduce the > issue with current master (nepomuk-core/widgets, kde-baseapps, etc) Actually, i have one tag duplicated from the time that happened. If i add that tag to file, the tag is *again* duplicated. Git commit 575a0f3443816231a57a96613b415b5f4f515157 by Vishesh Handa. Committed on 25/01/2013 at 12:00. Pushed by vhanda into branch 'KDE/4.10'. 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. Related: bug 313635 M +13 -8 ui/kedittagsdialog.cpp http://commits.kde.org/nepomuk-widgets/575a0f3443816231a57a96613b415b5f4f515157 |