equal
deleted
inserted
replaced
428 |
428 |
429 private: |
429 private: |
430 QString readData(const QByteArray &data) |
430 QString readData(const QByteArray &data) |
431 { |
431 { |
432 QTextStream textStream(data); |
432 QTextStream textStream(data); |
433 QByteArray charSet = QHelpGlobal::charsetFromData(data).toLatin1(); |
433 const QByteArray &codec = QHelpGlobal::codecFromData(data).toLatin1(); |
434 textStream.setCodec(QTextCodec::codecForName(charSet.constData())); |
434 textStream.setCodec(QTextCodec::codecForName(codec.constData())); |
435 |
435 |
436 QString stream = textStream.readAll(); |
436 QString stream = textStream.readAll(); |
437 if (stream.isNull() || stream.isEmpty()) |
437 if (stream.isNull() || stream.isEmpty()) |
438 return QString(); |
438 return QString(); |
439 |
439 |
576 } |
576 } |
577 |
577 |
578 void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, |
578 void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, |
579 const QString &indexFilesFolder, bool reindex) |
579 const QString &indexFilesFolder, bool reindex) |
580 { |
580 { |
|
581 wait(); |
581 mutex.lock(); |
582 mutex.lock(); |
582 this->m_cancel = false; |
583 this->m_cancel = false; |
583 this->m_reindex = reindex; |
584 this->m_reindex = reindex; |
584 this->m_collectionFile = collectionFile; |
585 this->m_collectionFile = collectionFile; |
585 this->m_indexFilesFolder = indexFilesFolder; |
586 this->m_indexFilesFolder = indexFilesFolder; |