equal
deleted
inserted
replaced
182 |
182 |
183 void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, |
183 void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, |
184 const QString &indexFilesFolder, |
184 const QString &indexFilesFolder, |
185 bool reindex) |
185 bool reindex) |
186 { |
186 { |
|
187 wait(); |
187 QMutexLocker lock(&mutex); |
188 QMutexLocker lock(&mutex); |
188 |
189 |
189 this->m_cancel = false; |
190 this->m_cancel = false; |
190 this->m_reindex = reindex; |
191 this->m_reindex = reindex; |
191 this->m_collectionFile = collectionFile; |
192 this->m_collectionFile = collectionFile; |
272 QByteArray data(engine.fileData(url)); |
273 QByteArray data(engine.fileData(url)); |
273 if (data.isEmpty()) |
274 if (data.isEmpty()) |
274 continue; |
275 continue; |
275 |
276 |
276 QTextStream s(data); |
277 QTextStream s(data); |
277 QString en = QHelpGlobal::charsetFromData(data); |
278 QString en = QHelpGlobal::codecFromData(data); |
278 s.setCodec(QTextCodec::codecForName(en.toLatin1().constData())); |
279 s.setCodec(QTextCodec::codecForName(en.toLatin1().constData())); |
279 |
280 |
280 QString text = s.readAll(); |
281 QString text = s.readAll(); |
281 if (text.isNull()) |
282 if (text.isNull()) |
282 continue; |
283 continue; |