tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
child 7 f7bc934e204c
child 18 2f34d5167611
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -430,8 +430,8 @@
     QString readData(const QByteArray &data)
     {
         QTextStream textStream(data);
-        QByteArray charSet = QHelpGlobal::charsetFromData(data).toLatin1();
-        textStream.setCodec(QTextCodec::codecForName(charSet.constData()));
+        const QByteArray &codec = QHelpGlobal::codecFromData(data).toLatin1();
+        textStream.setCodec(QTextCodec::codecForName(codec.constData()));
 
         QString stream = textStream.readAll();
         if (stream.isNull() || stream.isEmpty())
@@ -578,6 +578,7 @@
 void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile,
     const QString &indexFilesFolder, bool reindex)
 {
+    wait();
     mutex.lock();
     this->m_cancel = false;
     this->m_reindex = reindex;