aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-13 10:56:18 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-13 10:56:18 (GMT)
commit2e5f83261f5b837bad43e0824e59aa14689b8c64 (patch)
treee686080921c65cc79b3ffd25888bf72194ec5e21
parent3a9f83f5933041c23a644d1ac9e9d27d492bbcd5 (diff)
Cache end value
-rw-r--r--src/server/search/searchtaskmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/search/searchtaskmanager.cpp b/src/server/search/searchtaskmanager.cpp
index b86e11c..0a3e3dc 100644
--- a/src/server/search/searchtaskmanager.cpp
+++ b/src/server/search/searchtaskmanager.cpp
@@ -186,7 +186,8 @@ bool SearchTaskManager::allResourceTasksCompleted(SearchTask *agentSearchTask) c
// Check for running queries
QMap<QString, ResourceTask *>::const_iterator it = mRunningTasks.begin();
- for (; it != mRunningTasks.end(); ++it) {
+ QMap<QString, ResourceTask *>::const_iterator end = mRunningTasks.end();
+ for (; it != end; ++it) {
if (it.value()->parentTask == agentSearchTask) {
return false;
}