From 6b756dc2363b39f36d99f995886cf4a3336f10af Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 21 May 2008 05:18:30 +0000 Subject: [PATCH] last resort sort: alpha! svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810606 --- querymatch.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/querymatch.cpp b/querymatch.cpp index bf4031b92..b3b7d68c8 100644 --- a/querymatch.cpp +++ b/querymatch.cpp @@ -179,7 +179,13 @@ bool QueryMatch::operator<(const QueryMatch& other) const return other.isEnabled(); } - return d->relevance < other.d->relevance; + if (d->relevance != other.d->relevance) { + return d->relevance < other.d->relevance; + } + + // when resorting to sort by alpha, we want the + // reverse sort order! + return d->text > other.d->text; } return d->type < other.d->type;