diff --git a/src/plugins/help/helpindexfilter.cpp b/src/plugins/help/helpindexfilter.cpp index 8dcc4296598..a21dfb8caa8 100644 --- a/src/plugins/help/helpindexfilter.cpp +++ b/src/plugins/help/helpindexfilter.cpp @@ -87,6 +87,8 @@ QList HelpIndexFilter::matchesFor(QFutureInterface results; foreach (const QString &filePath, m_helpDatabases) { + if (future.isCanceled()) + return QList(); QSet result; QMetaObject::invokeMethod(this, "searchMatches", Qt::BlockingQueuedConnection, Q_RETURN_ARG(QSet, result), @@ -111,7 +113,7 @@ QList HelpIndexFilter::matchesFor(QFutureInterface allresults; foreach (const QString &keyword, m_keywordCache) { if (future.isCanceled()) - break; + return QList(); if (keyword.startsWith(entry, cs)) { keywords.append(keyword); allresults.insert(keyword);