use value/contains better.
svn path=/trunk/KDE/kdelibs/; revision=895573
This commit is contained in:
parent
ee776a8367
commit
2a8e07ba42
@ -242,12 +242,12 @@ QList<QueryMatch> RunnerContext::matches() const
|
||||
QueryMatch RunnerContext::match(const QString &id) const
|
||||
{
|
||||
LOCK_FOR_READ(this)
|
||||
if (d->matchesById.contains(id)) {
|
||||
const QueryMatch *match = d->matchesById.value(id);
|
||||
UNLOCK(this)
|
||||
const QueryMatch *match = d->matchesById.value(id, 0);
|
||||
UNLOCK(this)
|
||||
|
||||
if (match) {
|
||||
return *match;
|
||||
}
|
||||
UNLOCK(this)
|
||||
|
||||
return QueryMatch(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user