From 279ddc7e2bee2775981957764bf6e2d6ba14ddd0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Nov 01 2014 14:21:47 +0000 Subject: sync system-clucene patch from qt5-qttools (some QDir::mkpath in QtCLucene) * Sat Nov 01 2014 Kevin Kofler - 1:4.8.6-15 - sync system-clucene patch from qt5-qttools (some QDir::mkpath in QtCLucene) --- diff --git a/qt-everywhere-opensource-src-4.8.6-system-clucene.patch b/qt-everywhere-opensource-src-4.8.6-system-clucene.patch index 6e0c116..63a7462 100644 --- a/qt-everywhere-opensource-src-4.8.6-system-clucene.patch +++ b/qt-everywhere-opensource-src-4.8.6-system-clucene.patch @@ -223,7 +223,16 @@ diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/q 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 --- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexreader.cpp 2014-04-10 20:37:12.000000000 +0200 +++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexreader.cpp 2014-10-26 02:48:02.000000000 +0100 -@@ -59,13 +59,13 @@ +@@ -18,6 +18,8 @@ + #include "qindexreader_p.h" + #include "qclucene_global_p.h" + ++#include ++ + #include + #include + +@@ -59,13 +61,13 @@ { using namespace lucene::index; @@ -239,7 +248,7 @@ diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/q } QCLuceneIndexReader QCLuceneIndexReader::open(const QString &path) -@@ -73,7 +73,7 @@ +@@ -73,7 +75,7 @@ using namespace lucene::index; QCLuceneIndexReader indexReader; @@ -248,7 +257,7 @@ diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/q return indexReader; } -@@ -81,25 +81,25 @@ +@@ -81,25 +83,29 @@ void QCLuceneIndexReader::unlock(const QString &path) { using namespace lucene::index; @@ -258,6 +267,10 @@ diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/q bool QCLuceneIndexReader::isLocked(const QString &directory) { ++ // The system CLucene fails here if the directory does not exist yet, unlike ++ // the bundled one. Work around that. ++ QDir::current().mkpath(directory); ++ using namespace lucene::index; - return IndexReader::isLocked(directory); + return IndexReader::isLocked(directory.toLocal8Bit().constData()); @@ -278,7 +291,7 @@ diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/q } void QCLuceneIndexReader::close() -@@ -155,7 +155,7 @@ +@@ -155,7 +161,7 @@ void QCLuceneIndexReader::setNorm(qint32 doc, const QString &field, qreal value) { TCHAR *fieldName = QStringToTChar(field); @@ -290,11 +303,25 @@ diff -ur qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/q 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 --- qt-everywhere-opensource-src-4.8.6/tools/assistant/lib/fulltextsearch/qindexwriter.cpp 2014-04-10 20:37:12.000000000 +0200 +++ qt-everywhere-opensource-src-4.8.6-system-clucene/tools/assistant/lib/fulltextsearch/qindexwriter.cpp 2014-10-26 02:48:27.000000000 +0100 -@@ -50,7 +50,7 @@ +@@ -18,6 +18,8 @@ + #include "qindexwriter_p.h" + #include "qindexreader_p.h" + ++#include ++ + #include + #include + +@@ -50,7 +52,12 @@ : d(new QCLuceneIndexWriterPrivate()) , analyzer(analyzer) { - d->writer = new lucene::index::IndexWriter(path, ++ // The system CLucene cannot create directories recursively, so do it here. ++ // Ignore failure: If it failed, we will get an error from CLucene anyway. ++ if (create) ++ QDir::current().mkpath(path); ++ + d->writer = new lucene::index::IndexWriter(path.toLocal8Bit().constData(), analyzer.d->analyzer, create, closeDir); } diff --git a/qt.spec b/qt.spec index c9f35ba..2f61c43 100644 --- a/qt.spec +++ b/qt.spec @@ -35,7 +35,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.8.6 -Release: 14%{?dist} +Release: 15%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT @@ -1302,6 +1302,9 @@ fi %changelog +* Sat Nov 01 2014 Kevin Kofler - 1:4.8.6-15 +- sync system-clucene patch from qt5-qttools (some QDir::mkpath in QtCLucene) + * Sun Oct 26 2014 Kevin Kofler - 1:4.8.6-14 - build against the system clucene09-core (same patch as for qt5-qttools)