- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/tools/assistant/lib/qhelpsearchindexreader_default.cpp
r2 r561 2 2 ** 3 3 ** 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]) 5 6 ** 6 7 ** This file is part of the Qt Assistant of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 493 493 494 494 495 QHelpSearchIndexReader::QHelpSearchIndexReader() 496 : QThread() 497 , m_cancel(false) 495 QHelpSearchIndexReaderDefault::QHelpSearchIndexReaderDefault() 496 : QHelpSearchIndexReader() 498 497 { 499 498 // nothing todo 500 499 } 501 500 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() 501 QHelpSearchIndexReaderDefault::~QHelpSearchIndexReaderDefault() 502 { 503 } 504 505 void QHelpSearchIndexReaderDefault::run() 545 506 { 546 507 mutex.lock(); … … 572 533 if (!engine.setupData()) 573 534 return; 574 535 575 536 const QStringList registeredDocs = engine.registeredDocumentations(); 576 537 const QStringList indexedNamespaces = engine.customValue(key).toString().
Note:
See TracChangeset
for help on using the changeset viewer.