------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=132011 Summary: Add search criteria to take sub-tags into account Product: digikam Version: 0.8.2 Platform: Debian testing OS/Version: Linux Status: UNCONFIRMED Severity: wishlist Priority: NOR Component: general AssignedTo: digikam-devel kde org ReportedBy: riso kde ksp sk Version: 0.8.2 (using KDE KDE 3.5.3) Installed from: Debian testing/unstable Packages When searching for pictures, it is possible to specify the tag the picture should have, so the search returns all pictures with this tag. However, it does not return any pictures with sub-tags of the specified tag. IMHO it would be useful to add operators "Contains" and "Does not contain" for tag searching that would take sub-tags into account. E.g. selecting "Tag contains People/Family" would return all pictures tagged with any subtag of People/Family. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=132011 ------- Additional Comments From riso kde ksp sk 2006-08-07 17:37 ------- Created an attachment (id=17267) --> (http://bugs.kde.org/attachment.cgi?id=17267&action=view) Proposed patch to solve the feature request. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Richard Kralovic
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=132011 marcel.wiesweg gmx de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED ------- Additional Comments From marcel.wiesweg gmx de 2006-08-07 22:58 ------- SVN commit 570853 by mwiesweg: Applying proposed patch. Thanks to Richard Kralovic. BUG: 132011 M +2 -0 digikam/searchwidgets.cpp M +15 -1 kioslave/digikamsearch.cpp --- trunk/extragear/graphics/digikam/digikam/searchwidgets.cpp #570852:570853 @ -95,6 +95,8 @ { I18N_NOOP("Does Not Equal"), "NE", SearchAdvancedRule::ALBUMS }, { I18N_NOOP("Equals"), "EQ", SearchAdvancedRule::TAGS }, { I18N_NOOP("Does Not Equal"), "NE", SearchAdvancedRule::TAGS }, + { I18N_NOOP("Contains"), "LIKE", SearchAdvancedRule::TAGS }, + { I18N_NOOP("Does Not Contain"), "NLIKE", SearchAdvancedRule::TAGS }, { I18N_NOOP("After"), "GT", SearchAdvancedRule::DATE }, { I18N_NOOP("Before"), "LT", SearchAdvancedRule::DATE }, { I18N_NOOP("Equals"), "EQ", SearchAdvancedRule::DATE }, --- trunk/extragear/graphics/digikam/kioslave/digikamsearch.cpp #570852:570853 @ -471,14 +471,26 @ query = " (Images.id IN " " (SELECT imageid FROM ImageTags " " WHERE tagid = $$ $$)) "; - else + else if (op == NE) query = " (Images.id NOT IN " " (SELECT imageid FROM ImageTags " " WHERE tagid = $$ $$)) "; + else if (op == LIKE) + query = " (Images.id IN " + " (SELECT ImageTags.imageid FROM ImageTags JOIN TagsTree on ImageTags.tagid = TagsTree.id " + " WHERE TagsTree.pid = $$ $$ or ImageTags.tagid = $$ $$ )) "; + else // op == NLIKE + query = " (Images.id NOT IN " + " (SELECT ImageTags.imageid FROM ImageTags JOIN TagsTree on ImageTags.tagid = TagsTree.id " + " WHERE TagsTree.pid = $$ $$ or ImageTags.tagid = $$ $$ )) "; // query = " (Images.id IN " // " (SELECT imageid FROM ImageTags " // " WHERE tagid $$##$$ $$ $$)) "; + + query.replace("$$ $$", QString::fromLatin1("'") + escapeString(val) + + QString::fromLatin1("'")); + break; } case(TAGNAME): @ -516,6 +528,7 @ } } + if (key != TAG) { switch (op) { case(EQ): @ -561,6 +574,7 @ break; } } + } // special case for imagedate. If the key is imagedate and the operator is EQ, // we need to split it into two rules _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |