----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/116952/ -----------------------------------------------------------
(Updated March 23, 2014, 12:20 p.m.) Status ------ This change has been marked as submitted. Review request for KDE Frameworks and David Faure. Repository: kservice Description ------- Make sure non-prefixed desktop files win when looking up by name The existing code resolved all the overrides (based on storage id), then if there were multiple desktop files with the same id (say "konsole.desktop" and "kde4/konsole.desktop"), it would arbitrarily (due to the use of QHash) pick one of them to return from KService::serviceByDesktopName(), regardless of where in XDG_DATA_DIRS it was found. So you might get serviceByDesktopName("konsole") giving you "kde4/konsole.desktop" and serviceByDesktopName("amarok") giving you "amarok.desktop" (even if "kde4/amarok.desktop" also exists). This change makes desktop files without a prefix (like "konsole.desktop") override ones with a prefix (like "kde4/konsole.desktop"). If you also have "kde5/konsole.desktop", the ordering between that and "kde4/konsole.desktop" is still arbitrary, and the order of XDG_DATA_DIRS is ignored. Remove the prefix hacks from KService::serviceByDesktopName() These didn't work; the desktop file "kde4/konsole.desktop" will only be listed under the desktop name "konsole", not under the name "kde4-konsole". Add a test app for the KService::serviceBy* methods Diffs ----- src/kbuildsycoca/kbuildservicefactory.cpp 4dbb44b7db1a8bc4182899485db9c45c063c9b52 src/services/kservice.cpp 192682b514a69c41fb84231f3b04ec6e9218d587 tests/CMakeLists.txt 47894e5a6175dac924c2e700b2dafe936590cc1b tests/findservice.cpp PRE-CREATION Diff: https://git.reviewboard.kde.org/r/116952/diff/ Testing ------- Tested using the new test app. Thanks, Alex Merry
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel