improved sorting
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810114
This commit is contained in:
parent
4f31401ca9
commit
fdef4627ab
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user