Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/assistant/lib/qhelpsearchindexreader_default.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the Qt Assistant of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    493493
    494494
    495 QHelpSearchIndexReader::QHelpSearchIndexReader()
    496     : QThread()
    497     , m_cancel(false)
     495QHelpSearchIndexReaderDefault::QHelpSearchIndexReaderDefault()
     496    : QHelpSearchIndexReader()
    498497{
    499498    // nothing todo
    500499}
    501500
    502 QHelpSearchIndexReader::~QHelpSearchIndexReader()
    503 {
    504     mutex.lock();
    505     this->m_cancel = true;
    506     waitCondition.wakeOne();
    507     mutex.unlock();
    508 
    509     wait();
    510 }
    511 
    512 void QHelpSearchIndexReader::cancelSearching()
    513 {
    514     mutex.lock();
    515     this->m_cancel = true;
    516     mutex.unlock();
    517 }
    518 
    519 void QHelpSearchIndexReader::search(const QString &collectionFile,
    520                                     const QString &indexFilesFolder,
    521                                     const QList<QHelpSearchQuery> &queryList)
    522 {
    523     QMutexLocker lock(&mutex);
    524 
    525     this->hitList.clear();
    526     this->m_cancel = false;
    527     this->m_query = queryList;
    528     this->m_collectionFile = collectionFile;
    529     this->m_indexFilesFolder = indexFilesFolder;
    530 
    531     start(QThread::NormalPriority);
    532 }
    533 
    534 int QHelpSearchIndexReader::hitsCount() const
    535 {
    536     return hitList.count();
    537 }
    538 
    539 QHelpSearchEngine::SearchHit QHelpSearchIndexReader::hit(int index) const
    540 {
    541     return hitList.at(index);
    542 }
    543 
    544 void QHelpSearchIndexReader::run()
     501QHelpSearchIndexReaderDefault::~QHelpSearchIndexReaderDefault()
     502{
     503}
     504
     505void QHelpSearchIndexReaderDefault::run()
    545506{
    546507    mutex.lock();
     
    572533    if (!engine.setupData())
    573534        return;
    574    
     535
    575536    const QStringList registeredDocs = engine.registeredDocumentations();
    576537    const QStringList indexedNamespaces = engine.customValue(key).toString().
Note: See TracChangeset for help on using the changeset viewer.