Summary: | Duplicate tags in a file and cannot be deleted | ||
---|---|---|---|
Product: | [Unmaintained] nepomuk | Reporter: | Aristide <fmetton> |
Component: | general | Assignee: | Nepomuk Bugs Coordination <nepomuk-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adaptee, hrvoje.senjan, me, nepomuk-bugs |
Priority: | NOR | ||
Version: | 4.9.98 RC3 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
URL: | http://www.youtube.com/watch?v=Nhj6rQJvoh4 | ||
Latest Commit: | http://commits.kde.org/kdelibs/0e08394206b29a839e0ba1f09211c857c8abbbe5 | Version Fixed In: | |
Sentry Crash Report: |
Description
Aristide
2013-01-21 16:10:38 UTC
Wow. Thanks for the extremely detailed bug report. I have a fairly decent idea as to why this might be occurring. Could you perhaps try the same using the Dolphin sidebar instead of the going via the file the properties and Information. With 4.10, the code paths for Properties -> Information and the Dolphin sidebar widget are completely different. Check also bug #312606 Also i can't reproduce this with master, but as i wrote in mentioned bug report, the issue did happened at some point, but is gone for me Same problem. But delete $HOME/.kde4/share/apps/apps/nepomuk fix this problem. For information, this file has don't be deleted since KDE 4.8 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 312606 M +13 -8 ui/kedittagsdialog.cpp http://commits.kde.org/nepomuk-widgets/575a0f3443816231a57a96613b415b5f4f515157 Git commit 0e08394206b29a839e0ba1f09211c857c8abbbe5 by Vishesh Handa. Committed on 25/01/2013 at 12:16. 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. Cherry-picked from nepomuk-core 575a0f3443816231a57a96613b415b5f4f515157 This is being cherry-picked cause the Dolhin still uses the KFileMetadataWidget when you select File -> Properties -> Information. It uses the KFileMetadataWidget cause that is KIO code, not Dolphin. M +13 -8 nepomuk/ui/kedittagsdialog.cpp http://commits.kde.org/kdelibs/0e08394206b29a839e0ba1f09211c857c8abbbe5 |