summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib/qhelpsearchengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assistant/lib/qhelpsearchengine.cpp')
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 9faafe0..15f7f9e 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -96,6 +96,7 @@ private:
delete indexWriter;
}
+
int hitsCount() const
{
int count = 0;
@@ -107,12 +108,9 @@ private:
QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const
{
- QList<QHelpSearchEngine::SearchHit> returnValue;
- if (indexReader) {
- for (int i = start; i < end && i < hitsCount(); ++i)
- returnValue.append(indexReader->hit(i));
- }
- return returnValue;
+ return indexReader ?
+ indexReader->hits(start, end) :
+ QList<QHelpSearchEngine::SearchHit>();
}
void updateIndex(bool reindex = false)