adridg created this revision. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY - Helper function constructs a permutation of the list of menu-items that need to be sorted, then sorts and tests. - Test ten permutations of the list of items (not all of them, since it's a stable sort some permutations must produce a different sorted output, so no std::next_permutation here). Fix stable sorting of menu items. In the case i1 installed, but in section Main, and i2 uninstalled, this lambda returned False, meaning that i1 was not less than i2. Change comparison to always sort installed before uninstalled. TEST PLAN Revert the change to src/kmoretools/kmoretools_p.h to see the sorting test fail; restore the change for the fix. REPOSITORY R304 KNewStuff BRANCH master REVISION DETAIL https://phabricator.kde.org/D6049 AFFECTED FILES autotests/kmoretools/kmoretoolstest.cpp src/kmoretools/kmoretools_p.h To: adridg Cc: #frameworks