summaryrefslogtreecommitdiffstats
path: root/tools
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
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')
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp19
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp1
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h2
3 files changed, 6 insertions, 16 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;
};
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index 867e060..89d6040 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -70,7 +70,6 @@ QHelpSearchIndexReader::~QHelpSearchIndexReader()
{
mutex.lock();
this->m_cancel = true;
- waitCondition.wakeOne();
mutex.unlock();
wait();
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
index e7ac0eb..8876d80 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
@@ -106,8 +106,6 @@ private:
private:
mutable QMutex mutex;
QList<QHelpSearchEngine::SearchHit> hitList;
- QWaitCondition waitCondition;
-
bool m_cancel;
QString m_collectionFile;
QList<QHelpSearchQuery> m_query;