improved sorting

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810114
This commit is contained in:
Aaron J. Seigo 2008-05-20 02:47:13 +00:00
parent 4f31401ca9
commit fdef4627ab

View File

@ -174,7 +174,15 @@ bool QueryMatch::isEnabled() const
bool QueryMatch::operator<(const QueryMatch& other) const
{
return d->relevance < other.d->relevance;
if (d->type == other.d->type) {
if (isEnabled() != other.isEnabled()) {
return other.isEnabled();
}
return d->relevance < other.d->relevance;
}
return d->type < other.d->type;
}
QueryMatch& QueryMatch::operator=(const QueryMatch &other)