diff options
author | ck <qt-info@nokia.com> | 2009-07-27 15:41:41 (GMT) |
---|---|---|
committer | ck <qt-info@nokia.com> | 2009-07-27 15:41:41 (GMT) |
commit | 2ab5c57b593cb6874c035cb3abee574464ea8f30 (patch) | |
tree | 085d55247fe777fd40f895610a49c6a1531bd38f /tools/assistant/lib/qhelpsearchindexreader_clucene_p.h | |
parent | e5ef272382b124cf5d051ed7f25324fc804d97f6 (diff) | |
download | Qt-2ab5c57b593cb6874c035cb3abee574464ea8f30.zip Qt-2ab5c57b593cb6874c035cb3abee574464ea8f30.tar.gz Qt-2ab5c57b593cb6874c035cb3abee574464ea8f30.tar.bz2 |
Assistant: Removed redundancy in index reader classes.
Moved common parts of QHelpSearchIndexReader{Default,Clucene} into
a new common base class QHelpSearchIndexReader.
Reviewed-by: kh
Diffstat (limited to 'tools/assistant/lib/qhelpsearchindexreader_clucene_p.h')
-rw-r--r-- | tools/assistant/lib/qhelpsearchindexreader_clucene_p.h | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h index 8876d80..93ac6a8 100644 --- a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h +++ b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h @@ -53,44 +53,24 @@ // We mean it. // -#include "qhelpsearchengine.h" +#include "qhelpsearchindexreader_p.h" #include "fulltextsearch/qanalyzer_p.h" #include "fulltextsearch/qquery_p.h" -#include <QtCore/QList> -#include <QtCore/QMutex> -#include <QtCore/QObject> -#include <QtCore/QString> -#include <QtCore/QThread> -#include <QtCore/QWaitCondition> - -class QHelpEngineCore; - QT_BEGIN_NAMESPACE namespace qt { namespace fulltextsearch { namespace clucene { -class QHelpSearchIndexReader : public QThread +class QHelpSearchIndexReaderClucene : public QHelpSearchIndexReader { Q_OBJECT public: - QHelpSearchIndexReader(); - ~QHelpSearchIndexReader(); - - void cancelSearching(); - void search(const QString &collectionFile, - const QString &indexFilesFolder, - const QList<QHelpSearchQuery> &queryList); - int hitsCount() const; - QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const; - -signals: - void searchingStarted(); - void searchingFinished(int hits); + QHelpSearchIndexReaderClucene(); + ~QHelpSearchIndexReaderClucene(); private: void run(); @@ -102,14 +82,6 @@ private: const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer); void boostSearchHits(const QHelpEngineCore &engine, QList<QHelpSearchEngine::SearchHit> &hitList, const QList<QHelpSearchQuery> &queryList); - -private: - mutable QMutex mutex; - QList<QHelpSearchEngine::SearchHit> hitList; - bool m_cancel; - QString m_collectionFile; - QList<QHelpSearchQuery> m_query; - QString m_indexFilesFolder; }; } // namespace clucene |