Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/fulltextsearch.pri qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/fulltextsearch.pri
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/fulltextsearch.pri	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/fulltextsearch.pri	2014-10-26 03:33:45.000000000 +0100
Kevin Kofler 53156e
@@ -1,125 +1,7 @@
Kevin Kofler 53156e
-DEFINES += _BUILD_FOR_QT_ LUCENE_DISABLE_MEMTRACKING
Kevin Kofler 53156e
-win32:DEFINES += _CRT_SECURE_NO_DEPRECATE _MT
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-CLUCENEDIR = ../../../../src/3rdparty/clucene/src/CLucene
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-INCLUDEPATH += . .. \
Kevin Kofler 53156e
-               $$CLUCENEDIR \
Kevin Kofler 53156e
-               $$CLUCENEDIR/../ \
Kevin Kofler 53156e
-               $$CLUCENEDIR/analysis \
Kevin Kofler 53156e
-               $$CLUCENEDIR/analysis/standard \
Kevin Kofler 53156e
-               $$CLUCENEDIR/config \
Kevin Kofler 53156e
-               $$CLUCENEDIR/debug \
Kevin Kofler 53156e
-               $$CLUCENEDIR/document \
Kevin Kofler 53156e
-               $$CLUCENEDIR/index \
Kevin Kofler 53156e
-               $$CLUCENEDIR/queryParser \
Kevin Kofler 53156e
-               $$CLUCENEDIR/search \
Kevin Kofler 53156e
-               $$CLUCENEDIR/store \
Kevin Kofler 53156e
-               $$CLUCENEDIR/util
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-SOURCES += $$CLUCENEDIR/StdHeader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/analysis/AnalysisHeader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/analysis/Analyzers.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/gunichartables.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/repl_lltot.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/repl_tcscasecmp.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/repl_tcslwr.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/repl_tcstod.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/repl_tcstoll.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/repl_tprintf.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/threads.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/config/utf8.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/debug/condition.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/debug/error.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/debug/memtracking.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/document/DateField.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/document/Document.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/document/Field.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/CompoundFile.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/DocumentWriter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/FieldInfos.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/FieldsReader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/FieldsWriter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/IndexModifier.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/IndexReader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/IndexWriter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/MultiReader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentInfos.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentMergeInfo.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentMergeQueue.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentMerger.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentReader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentTermDocs.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentTermEnum.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentTermPositions.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/SegmentTermVector.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/Term.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/TermInfo.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/TermInfosReader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/TermInfosWriter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/TermVectorReader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/index/TermVectorWriter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/queryParser/Lexer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/queryParser/MultiFieldQueryParser.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/queryParser/QueryParser.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/queryParser/QueryParserBase.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/queryParser/QueryToken.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/queryParser/TokenList.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/BooleanQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/BooleanScorer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/CachingWrapperFilter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/ChainedFilter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/ConjunctionScorer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/DateFilter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/ExactPhraseScorer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/Explanation.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/FieldCache.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/FieldCacheImpl.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/FieldDocSortedHitQueue.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/FieldSortedHitQueue.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/FilteredTermEnum.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/FuzzyQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/HitQueue.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/Hits.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/IndexSearcher.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/MultiSearcher.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/MultiTermQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/PhrasePositions.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/PhraseQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/PhraseScorer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/PrefixQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/QueryFilter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/RangeFilter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/RangeQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/SearchHeader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/Similarity.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/SloppyPhraseScorer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/Sort.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/TermQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/TermScorer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/WildcardQuery.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/search/WildcardTermEnum.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/FSDirectory.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/IndexInput.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/IndexOutput.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/Lock.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/MMapInput.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/RAMDirectory.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/store/TransactionalRAMDirectory.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/BitSet.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/Equators.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/FastCharStream.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/fileinputstream.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/Misc.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/Reader.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/StringBuffer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/StringIntern.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/util/ThreadLocal.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/analysis/standard/StandardAnalyzer.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/analysis/standard/StandardFilter.cpp \
Kevin Kofler 53156e
-           $$CLUCENEDIR/analysis/standard/StandardTokenizer.cpp
Kevin Kofler 53156e
 
Kevin Kofler 53156e
+INCLUDEPATH += /usr/include/clucene09 $$[QT_INSTALL_LIBS]/clucene09 $$[QT_INSTALL_LIBS]
Kevin Kofler 53156e
+LIBS += -L$$[QT_INSTALL_LIBS]/clucene09 -lclucene
Kevin Kofler 53156e
+#DEFINES += LUCENE_ENABLE_REFCOUNT (must be set at CLucene build time!)
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 #Header files
Kevin Kofler 53156e
 HEADERS += qclucene_global_p.h \
Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene-config_p.h qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene-config_p.h	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene-config_p.h	2014-10-26 02:28:54.000000000 +0100
Kevin Kofler 53156e
@@ -15,6 +15,8 @@
Kevin Kofler 53156e
 **
Kevin Kofler 53156e
 ****************************************************************************/
Kevin Kofler 53156e
 
Kevin Kofler 53156e
+#error This header must not be included when building against system CLucene.
Kevin Kofler 53156e
+
Kevin Kofler 53156e
 #ifndef QCLUCENE_CONFIG_P_H
Kevin Kofler 53156e
 #define QCLUCENE_CONFIG_P_H
Kevin Kofler 53156e
 
Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene_global_p.h qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene_global_p.h
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qclucene_global_p.h	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qclucene_global_p.h	2014-10-26 02:31:54.000000000 +0100
Kevin Kofler 53156e
@@ -29,20 +29,10 @@
Kevin Kofler 53156e
 // We mean it.
Kevin Kofler 53156e
 //
Kevin Kofler 53156e
 
Kevin Kofler 53156e
-#if !defined(_MSC_VER)
Kevin Kofler 53156e
-#   include "qclucene-config_p.h"
Kevin Kofler 53156e
-#endif
Kevin Kofler 53156e
-
Kevin Kofler 53156e
 #include <QtCore/QChar>
Kevin Kofler 53156e
 #include <QtCore/QString>
Kevin Kofler 53156e
 
Kevin Kofler 53156e
-#if !defined(_MSC_VER) && !defined(__MINGW32__) && defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T)
Kevin Kofler 53156e
-#   if !defined(TCHAR)
Kevin Kofler 53156e
-#       define TCHAR wchar_t
Kevin Kofler 53156e
-#   endif
Kevin Kofler 53156e
-#else
Kevin Kofler 53156e
-#   include <windows.h>
Kevin Kofler 53156e
-#endif
Kevin Kofler 53156e
+#include <CLucene/StdHeader.h>
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 QT_BEGIN_HEADER
Kevin Kofler 53156e
 
Kevin Kofler 53156e
@@ -56,52 +46,6 @@
Kevin Kofler 53156e
 #   define QHELP_EXPORT Q_DECL_IMPORT
Kevin Kofler 53156e
 #endif
Kevin Kofler 53156e
 
Kevin Kofler 53156e
-//
Kevin Kofler 53156e
-//  W A R N I N G
Kevin Kofler 53156e
-//  -------------
Kevin Kofler 53156e
-//
Kevin Kofler 53156e
-// adjustments here, need to be done in 
Kevin Kofler 53156e
-// QTDIR/src/3rdparty/clucene/src/CLucene/StdHeader.h as well
Kevin Kofler 53156e
-//
Kevin Kofler 53156e
-#if defined(_LUCENE_DONTIMPLEMENT_NS_MACROS)
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#elif !defined(DISABLE_NAMESPACE)
Kevin Kofler 53156e
-#   ifdef QT_NAMESPACE
Kevin Kofler 53156e
-#       define CL_NS_DEF(sub) namespace QT_NAMESPACE { namespace lucene{ namespace sub{
Kevin Kofler 53156e
-#       define CL_NS_DEF2(sub,sub2) namespace QT_NAMESPACE { namespace lucene{ namespace sub{ namespace sub2 {
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#       define CL_NS_END }}}
Kevin Kofler 53156e
-#       define CL_NS_END2 }}}}
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#       define CL_NS_USE(sub) using namespace QT_NAMESPACE::lucene::sub;
Kevin Kofler 53156e
-#       define CL_NS_USE2(sub,sub2) using namespace QT_NAMESPACE::lucene::sub::sub2;
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#       define CL_NS(sub) QT_NAMESPACE::lucene::sub
Kevin Kofler 53156e
-#       define CL_NS2(sub,sub2) QT_NAMESPACE::lucene::sub::sub2
Kevin Kofler 53156e
-#   else
Kevin Kofler 53156e
-#       define CL_NS_DEF(sub) namespace lucene{ namespace sub{
Kevin Kofler 53156e
-#       define CL_NS_DEF2(sub,sub2) namespace lucene{ namespace sub{ namespace sub2 {
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#       define CL_NS_END }}
Kevin Kofler 53156e
-#       define CL_NS_END2 }}}
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#       define CL_NS_USE(sub) using namespace lucene::sub;
Kevin Kofler 53156e
-#       define CL_NS_USE2(sub,sub2) using namespace lucene::sub::sub2;
Kevin Kofler 53156e
-
Kevin Kofler 53156e
-#       define CL_NS(sub) lucene::sub
Kevin Kofler 53156e
-#       define CL_NS2(sub,sub2) lucene::sub::sub2
Kevin Kofler 53156e
-#   endif
Kevin Kofler 53156e
-#else
Kevin Kofler 53156e
-#   define CL_NS_DEF(sub)
Kevin Kofler 53156e
-#   define CL_NS_DEF2(sub, sub2)
Kevin Kofler 53156e
-#   define CL_NS_END
Kevin Kofler 53156e
-#   define CL_NS_END2
Kevin Kofler 53156e
-#   define CL_NS_USE(sub)
Kevin Kofler 53156e
-#   define CL_NS_USE2(sub,sub2)
Kevin Kofler 53156e
-#   define CL_NS(sub)
Kevin Kofler 53156e
-#   define CL_NS2(sub,sub2)
Kevin Kofler 53156e
-#endif
Kevin Kofler 53156e
-
Kevin Kofler 53156e
 namespace {
Kevin Kofler 53156e
     TCHAR* QStringToTChar(const QString &str)
Kevin Kofler 53156e
     {
Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexreader.cpp qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexreader.cpp
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexreader.cpp	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexreader.cpp	2014-10-26 02:48:02.000000000 +0100
Kevin Kofler 279ddc
@@ -18,6 +18,8 @@
Kevin Kofler 279ddc
 #include "qindexreader_p.h"
Kevin Kofler 279ddc
 #include "qclucene_global_p.h"
Kevin Kofler 279ddc
 
Kevin Kofler 279ddc
+#include <QtCore/QDir>
Kevin Kofler 279ddc
+
Kevin Kofler 279ddc
 #include <CLucene.h>
Kevin Kofler 279ddc
 #include <CLucene/index/IndexReader.h>
Kevin Kofler 279ddc
 
Kevin Kofler 279ddc
@@ -59,13 +61,13 @@
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
 
Kevin Kofler 53156e
-    return IndexReader::isLuceneFile(filename);
Kevin Kofler 53156e
+    return IndexReader::isLuceneFile(filename.toLocal8Bit().constData());
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 bool QCLuceneIndexReader::indexExists(const QString &directory)
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
-    return IndexReader::indexExists(directory);
Kevin Kofler 53156e
+    return IndexReader::indexExists(directory.toLocal8Bit().constData());
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 QCLuceneIndexReader QCLuceneIndexReader::open(const QString &path)
Kevin Kofler 279ddc
@@ -73,7 +75,7 @@
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
 
Kevin Kofler 53156e
     QCLuceneIndexReader indexReader;
Kevin Kofler 53156e
-    indexReader.d->reader = IndexReader::open(path);
Kevin Kofler 53156e
+    indexReader.d->reader = IndexReader::open(path.toLocal8Bit().constData());
Kevin Kofler 53156e
     
Kevin Kofler 53156e
     return indexReader;
Kevin Kofler 53156e
 }
Kevin Kofler 279ddc
@@ -81,25 +83,29 @@
Kevin Kofler 53156e
 void QCLuceneIndexReader::unlock(const QString &path)
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
-    IndexReader::unlock(path);
Kevin Kofler 53156e
+    IndexReader::unlock(path.toLocal8Bit().constData());
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 bool QCLuceneIndexReader::isLocked(const QString &directory)
Kevin Kofler 53156e
 {
Kevin Kofler 279ddc
+    // The system CLucene fails here if the directory does not exist yet, unlike
Kevin Kofler 279ddc
+    // the bundled one. Work around that.
Kevin Kofler 279ddc
+    QDir::current().mkpath(directory);
Kevin Kofler 279ddc
+
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
-    return IndexReader::isLocked(directory);
Kevin Kofler 53156e
+    return IndexReader::isLocked(directory.toLocal8Bit().constData());
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 quint64 QCLuceneIndexReader::lastModified(const QString &directory)
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
-    return quint64(IndexReader::lastModified(directory));
Kevin Kofler 53156e
+    return quint64(IndexReader::lastModified(directory.toLocal8Bit().constData()));
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 qint64 QCLuceneIndexReader::getCurrentVersion(const QString &directory)
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     using namespace lucene::index;
Kevin Kofler 53156e
-    return qint64(IndexReader::getCurrentVersion(directory));
Kevin Kofler 53156e
+    return qint64(IndexReader::getCurrentVersion(directory.toLocal8Bit().constData()));
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 void QCLuceneIndexReader::close()
Kevin Kofler 279ddc
@@ -155,7 +161,7 @@
Kevin Kofler 53156e
 void QCLuceneIndexReader::setNorm(qint32 doc, const QString &field, qreal value)
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     TCHAR *fieldName = QStringToTChar(field);
Kevin Kofler 53156e
-    d->reader->setNorm(int32_t(doc), fieldName, qreal(value));
Kevin Kofler 53156e
+    d->reader->setNorm(int32_t(doc), fieldName, (float_t)value);
Kevin Kofler 53156e
     delete [] fieldName;
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexwriter.cpp qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexwriter.cpp
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexwriter.cpp	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexwriter.cpp	2014-10-26 02:48:27.000000000 +0100
Kevin Kofler 279ddc
@@ -18,6 +18,8 @@
Kevin Kofler 279ddc
 #include "qindexwriter_p.h"
Kevin Kofler 279ddc
 #include "qindexreader_p.h"
Kevin Kofler 279ddc
 
Kevin Kofler 279ddc
+#include <QtCore/QDir>
Kevin Kofler 279ddc
+
Kevin Kofler 279ddc
 #include <CLucene.h>
Kevin Kofler 279ddc
 #include <CLucene/index/IndexWriter.h>
Kevin Kofler 279ddc
 
Kevin Kofler 279ddc
@@ -50,7 +52,12 @@
Kevin Kofler 53156e
     : d(new QCLuceneIndexWriterPrivate())
Kevin Kofler 53156e
     , analyzer(analyzer)
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
-    d->writer = new lucene::index::IndexWriter(path, 
Kevin Kofler 279ddc
+    // The system CLucene cannot create directories recursively, so do it here.
Kevin Kofler 279ddc
+    // Ignore failure: If it failed, we will get an error from CLucene anyway.
Kevin Kofler 279ddc
+    if (create)
Kevin Kofler 279ddc
+        QDir::current().mkpath(path);
Kevin Kofler 279ddc
+
Kevin Kofler 53156e
+    d->writer = new lucene::index::IndexWriter(path.toLocal8Bit().constData(), 
Kevin Kofler 53156e
         analyzer.d->analyzer, create, closeDir);
Kevin Kofler 53156e
 }
Kevin Kofler 53156e
 
Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qsearchable.cpp qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qsearchable.cpp
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qsearchable.cpp	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qsearchable.cpp	2014-10-26 02:48:44.000000000 +0100
Kevin Kofler 53156e
@@ -95,7 +95,7 @@
Kevin Kofler 53156e
     : QCLuceneSearcher()
Kevin Kofler 53156e
 {
Kevin Kofler 53156e
     lucene::search::IndexSearcher *searcher =
Kevin Kofler 53156e
-        new lucene::search::IndexSearcher(path);
Kevin Kofler 53156e
+        new lucene::search::IndexSearcher(path.toLocal8Bit().constData());
Kevin Kofler 53156e
 
Kevin Kofler 53156e
     reader.d->reader = searcher->getReader();
Kevin Kofler 53156e
     reader.d->deleteCLuceneIndexReader = false;
Kevin Kofler 53156e
diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/lib.pro qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/lib.pro
Kevin Kofler 53156e
--- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/lib.pro	2014-04-10 20:37:12.000000000 +0200
Kevin Kofler 53156e
+++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/lib.pro	2014-10-26 02:27:55.000000000 +0100
Kevin Kofler 53156e
@@ -43,6 +43,7 @@
Kevin Kofler 53156e
     qhelp_global.cpp
Kevin Kofler 53156e
 
Kevin Kofler 53156e
 # access to clucene
Kevin Kofler 53156e
+INCLUDEPATH += /usr/include/clucene09 $$[QT_INSTALL_LIBS]/clucene09 $$[QT_INSTALL_LIBS]
Kevin Kofler 53156e
 SOURCES += qhelpsearchindexwriter_clucene.cpp \
Kevin Kofler 53156e
     qhelpsearchindexreader_clucene.cpp
Kevin Kofler 53156e
 HEADERS += qhelpenginecore.h \