summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib/qhelpsearchengine.cpp
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2009-07-06 08:24:37 (GMT)
committerck <qt-info@nokia.com>2009-07-06 08:24:37 (GMT)
commit18a717b3f2e6a19a5ad631b68b26d09ba934bece (patch)
treeed1c62f39633c9344ac55db694a31890ed0d2f45 /tools/assistant/lib/qhelpsearchengine.cpp
parentbf5112c6673d32cbaad33c388d38690264adf107 (diff)
downloadQt-18a717b3f2e6a19a5ad631b68b26d09ba934bece.zip
Qt-18a717b3f2e6a19a5ad631b68b26d09ba934bece.tar.gz
Qt-18a717b3f2e6a19a5ad631b68b26d09ba934bece.tar.bz2
Removed superfluous code in assistant's search module.
Reviewed-by: kh
Diffstat (limited to 'tools/assistant/lib/qhelpsearchengine.cpp')
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 15f7f9e..2a41d04 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -84,14 +84,12 @@ private:
, resultWidget(0)
, helpEngine(helpEngine)
{
- hitList.clear();
indexReader = 0;
indexWriter = 0;
}
~QHelpSearchEnginePrivate()
{
- hitList.clear();
delete indexReader;
delete indexWriter;
}
@@ -129,11 +127,9 @@ private:
connect(indexWriter, SIGNAL(indexingFinished()), this, SLOT(optimizeIndex()));
}
- if (indexWriter) {
- indexWriter->cancelIndexing();
- indexWriter->updateIndex(helpEngine->collectionFile(),
- indexFilesFolder(), reindex);
- }
+ indexWriter->cancelIndexing();
+ indexWriter->updateIndex(helpEngine->collectionFile(),
+ indexFilesFolder(), reindex);
}
void cancelIndexing()
@@ -157,11 +153,9 @@ private:
connect(indexReader, SIGNAL(searchingFinished(int)), this, SIGNAL(searchingFinished(int)));
}
- if (indexReader) {
- m_queryList = queryList;
- indexReader->cancelSearching();
- indexReader->search(helpEngine->collectionFile(), indexFilesFolder(), queryList);
- }
+ m_queryList = queryList;
+ indexReader->cancelSearching();
+ indexReader->search(helpEngine->collectionFile(), indexFilesFolder(), queryList);
}
void cancelSearching()
@@ -202,7 +196,6 @@ private:
QHelpSearchIndexWriter *indexWriter;
QPointer<QHelpEngineCore> helpEngine;
- QList<QHelpSearchEngine::SearchHit> hitList;
QList<QHelpSearchQuery> m_queryList;
};