summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/lib.pro96
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp14
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader.cpp106
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp60
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h36
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default.cpp49
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default_p.h37
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_p.h108
-rw-r--r--tools/assistant/tools/qhelpconverter/adpreader.cpp20
-rw-r--r--tools/assistant/tools/qhelpconverter/adpreader.h6
-rw-r--r--tools/configure/configureapp.cpp16
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp28
-rw-r--r--tools/linguist/lupdate/main.cpp3
-rw-r--r--tools/qdoc3/htmlgenerator.cpp28
-rw-r--r--tools/qdoc3/htmlgenerator.h1
15 files changed, 377 insertions, 231 deletions
diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro
index bd9ed53..5d6d436 100644
--- a/tools/assistant/lib/lib.pro
+++ b/tools/assistant/lib/lib.pro
@@ -1,65 +1,71 @@
-QT += sql xml network
+QT += sql \
+ xml \
+ network
TEMPLATE = lib
TARGET = QtHelp
-DEFINES += QHELP_LIB QT_CLUCENE_SUPPORT
-CONFIG += qt warn_on
-
+DEFINES += QHELP_LIB \
+ QT_CLUCENE_SUPPORT
+CONFIG += qt \
+ warn_on
include(../../../src/qbase.pri)
-
QMAKE_TARGET_PRODUCT = Help
-QMAKE_TARGET_DESCRIPTION = Help application framework.
+QMAKE_TARGET_DESCRIPTION = Help \
+ application \
+ framework.
DEFINES -= QT_ASCII_CAST_WARNINGS
-
qclucene = QtCLucene$${QT_LIBINFIX}
-if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
+if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
mac:qclucene = $${qclucene}_debug
win32:qclucene = $${qclucene}d
}
linux-lsb-g++:LIBS += --lsb-shared-libs=$$qclucene
-unix:QMAKE_PKGCONFIG_REQUIRES += QtNetwork QtSql QtXml
+unix:QMAKE_PKGCONFIG_REQUIRES += QtNetwork \
+ QtSql \
+ QtXml
LIBS += -l$$qclucene
-unix:QMAKE_PKGCONFIG_REQUIRES += QtNetwork QtSql QtXml
-
+unix:QMAKE_PKGCONFIG_REQUIRES += QtNetwork \
+ QtSql \
+ QtXml
RESOURCES += helpsystem.qrc
-
SOURCES += qhelpenginecore.cpp \
- qhelpengine.cpp \
- qhelpdbreader.cpp \
- qhelpcontentwidget.cpp \
- qhelpindexwidget.cpp \
- qhelpgenerator.cpp \
- qhelpdatainterface.cpp \
- qhelpprojectdata.cpp \
- qhelpcollectionhandler.cpp \
- qhelpsearchengine.cpp \
- qhelpsearchquerywidget.cpp \
- qhelpsearchresultwidget.cpp \
- qhelpsearchindex_default.cpp \
- qhelpsearchindexwriter_default.cpp \
- qhelpsearchindexreader_default.cpp
+ qhelpengine.cpp \
+ qhelpdbreader.cpp \
+ qhelpcontentwidget.cpp \
+ qhelpindexwidget.cpp \
+ qhelpgenerator.cpp \
+ qhelpdatainterface.cpp \
+ qhelpprojectdata.cpp \
+ qhelpcollectionhandler.cpp \
+ qhelpsearchengine.cpp \
+ qhelpsearchquerywidget.cpp \
+ qhelpsearchresultwidget.cpp \
+ qhelpsearchindex_default.cpp \
+ qhelpsearchindexwriter_default.cpp \
+ qhelpsearchindexreader_default.cpp \
+ qhelpsearchindexreader.cpp
# access to clucene
SOURCES += qhelpsearchindexwriter_clucene.cpp \
- qhelpsearchindexreader_clucene.cpp
-
+ qhelpsearchindexreader_clucene.cpp
HEADERS += qhelpenginecore.h \
- qhelpengine.h \
- qhelpengine_p.h \
- qhelp_global.h \
- qhelpdbreader_p.h \
- qhelpcontentwidget.h \
- qhelpindexwidget.h \
- qhelpgenerator_p.h \
- qhelpdatainterface_p.h \
- qhelpprojectdata_p.h \
- qhelpcollectionhandler_p.h \
- qhelpsearchengine.h \
- qhelpsearchquerywidget.h \
- qhelpsearchresultwidget.h \
- qhelpsearchindex_default_p.h \
- qhelpsearchindexwriter_default_p.h \
- qhelpsearchindexreader_default_p.h
+ qhelpengine.h \
+ qhelpengine_p.h \
+ qhelp_global.h \
+ qhelpdbreader_p.h \
+ qhelpcontentwidget.h \
+ qhelpindexwidget.h \
+ qhelpgenerator_p.h \
+ qhelpdatainterface_p.h \
+ qhelpprojectdata_p.h \
+ qhelpcollectionhandler_p.h \
+ qhelpsearchengine.h \
+ qhelpsearchquerywidget.h \
+ qhelpsearchresultwidget.h \
+ qhelpsearchindex_default_p.h \
+ qhelpsearchindexwriter_default_p.h \
+ qhelpsearchindexreader_default_p.h \
+ qhelpsearchindexreader_p.h
# access to clucene
HEADERS += qhelpsearchindexwriter_clucene_p.h \
- qhelpsearchindexreader_clucene_p.h
+ qhelpsearchindexreader_clucene_p.h
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 2a41d04..94c5f7e 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -44,6 +44,7 @@
#include "qhelpsearchquerywidget.h"
#include "qhelpsearchresultwidget.h"
+#include "qhelpsearchindexreader_p.h"
#if defined(QT_CLUCENE_SUPPORT)
# include "qhelpsearchindexreader_clucene_p.h"
# include "qhelpsearchindexwriter_clucene_p.h"
@@ -147,8 +148,11 @@ private:
return;
if (!indexReader) {
- indexReader = new QHelpSearchIndexReader();
-
+#if defined(QT_CLUCENE_SUPPORT)
+ indexReader = new QHelpSearchIndexReaderClucene();
+#else
+ indexReader = new QHelpSearchIndexReaderDefault();
+#endif // QT_CLUCENE_SUPPORT
connect(indexReader, SIGNAL(searchingStarted()), this, SIGNAL(searchingStarted()));
connect(indexReader, SIGNAL(searchingFinished(int)), this, SIGNAL(searchingFinished(int)));
}
@@ -181,7 +185,7 @@ private slots:
{
#if defined(QT_CLUCENE_SUPPORT)
if (indexWriter && !helpEngine.isNull()) {
- indexWriter->optimizeIndex();
+ indexWriter->optimizeIndex();
}
#endif
}
@@ -192,7 +196,7 @@ private:
QHelpSearchQueryWidget *queryWidget;
QHelpSearchResultWidget *resultWidget;
- QHelpSearchIndexReader *indexReader;
+ qt::fulltextsearch::QHelpSearchIndexReader *indexReader;
QHelpSearchIndexWriter *indexWriter;
QPointer<QHelpEngineCore> helpEngine;
@@ -321,7 +325,7 @@ QHelpSearchEngine::QHelpSearchEngine(QHelpEngineCore *helpEngine, QObject *paren
: QObject(parent)
{
d = new QHelpSearchEnginePrivate(helpEngine);
-
+
connect(helpEngine, SIGNAL(setupFinished()), this, SLOT(indexDocumentation()));
connect(d, SIGNAL(indexingStarted()), this, SIGNAL(indexingStarted()));
diff --git a/tools/assistant/lib/qhelpsearchindexreader.cpp b/tools/assistant/lib/qhelpsearchindexreader.cpp
new file mode 100644
index 0000000..a0fcbe5
--- /dev/null
+++ b/tools/assistant/lib/qhelpsearchindexreader.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qhelpsearchindexreader_p.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace qt {
+ namespace fulltextsearch {
+
+QHelpSearchIndexReader::QHelpSearchIndexReader()
+ : QThread()
+ , m_cancel(false)
+{
+ // nothing todo
+}
+
+QHelpSearchIndexReader::~QHelpSearchIndexReader()
+{
+ mutex.lock();
+ this->m_cancel = true;
+ mutex.unlock();
+
+ wait();
+}
+
+void QHelpSearchIndexReader::cancelSearching()
+{
+ mutex.lock();
+ this->m_cancel = true;
+ mutex.unlock();
+}
+
+void QHelpSearchIndexReader::search(const QString &collectionFile, const QString &indexFilesFolder,
+ const QList<QHelpSearchQuery> &queryList)
+{
+ wait();
+
+ this->hitList.clear();
+ this->m_cancel = false;
+ this->m_query = queryList;
+ this->m_collectionFile = collectionFile;
+ this->m_indexFilesFolder = indexFilesFolder;
+
+ start(QThread::NormalPriority);
+}
+
+int QHelpSearchIndexReader::hitsCount() const
+{
+ QMutexLocker lock(&mutex);
+ return hitList.count();
+}
+
+QList<QHelpSearchEngine::SearchHit> QHelpSearchIndexReader::hits(int start,
+ int end) const
+{
+ QList<QHelpSearchEngine::SearchHit> hits;
+ QMutexLocker lock(&mutex);
+ for (int i = start; i < end && i < hitList.count(); ++i)
+ hits.append(hitList.at(i));
+ return hits;
+}
+
+
+ } // namespace fulltextsearch
+} // namespace qt
+
+QT_END_NAMESPACE
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index 89d6040..b417078 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -59,60 +59,18 @@ namespace qt {
namespace fulltextsearch {
namespace clucene {
-QHelpSearchIndexReader::QHelpSearchIndexReader()
- : QThread()
- , m_cancel(false)
+QHelpSearchIndexReaderClucene::QHelpSearchIndexReaderClucene()
+ : QHelpSearchIndexReader()
{
// nothing todo
}
-QHelpSearchIndexReader::~QHelpSearchIndexReader()
+QHelpSearchIndexReaderClucene::~QHelpSearchIndexReaderClucene()
{
- mutex.lock();
- this->m_cancel = true;
- mutex.unlock();
-
- wait();
}
-void QHelpSearchIndexReader::cancelSearching()
-{
- mutex.lock();
- this->m_cancel = true;
- mutex.unlock();
-}
-void QHelpSearchIndexReader::search(const QString &collectionFile, const QString &indexFilesFolder,
- const QList<QHelpSearchQuery> &queryList)
-{
- wait();
-
- this->hitList.clear();
- this->m_cancel = false;
- this->m_query = queryList;
- this->m_collectionFile = collectionFile;
- this->m_indexFilesFolder = indexFilesFolder;
-
- start(QThread::NormalPriority);
-}
-
-int QHelpSearchIndexReader::hitsCount() const
-{
- QMutexLocker lock(&mutex);
- return hitList.count();
-}
-
-QList<QHelpSearchEngine::SearchHit> QHelpSearchIndexReader::hits(int start,
- int end) const
-{
- QList<QHelpSearchEngine::SearchHit> hits;
- QMutexLocker lock(&mutex);
- for (int i = start; i < end && i < hitList.count(); ++i)
- hits.append(hitList.at(i));
- return hits;
-}
-
-void QHelpSearchIndexReader::run()
+void QHelpSearchIndexReaderClucene::run()
{
mutex.lock();
@@ -140,7 +98,7 @@ void QHelpSearchIndexReader::run()
if(QCLuceneIndexReader::indexExists(indexPath)) {
mutex.lock();
if (m_cancel) {
- mutex.unlock();
+ mutex.unlock();
return;
}
mutex.unlock();
@@ -227,7 +185,7 @@ void QHelpSearchIndexReader::run()
}
}
-bool QHelpSearchIndexReader::defaultQuery(const QString &term, QCLuceneBooleanQuery &booleanQuery,
+bool QHelpSearchIndexReaderClucene::defaultQuery(const QString &term, QCLuceneBooleanQuery &booleanQuery,
QCLuceneStandardAnalyzer &analyzer)
{
const QLatin1String c("content");
@@ -244,7 +202,7 @@ bool QHelpSearchIndexReader::defaultQuery(const QString &term, QCLuceneBooleanQu
return false;
}
-bool QHelpSearchIndexReader::buildQuery(QCLuceneBooleanQuery &booleanQuery,
+bool QHelpSearchIndexReaderClucene::buildQuery(QCLuceneBooleanQuery &booleanQuery,
const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer)
{
foreach (const QHelpSearchQuery query, queryList) {
@@ -344,7 +302,7 @@ bool QHelpSearchIndexReader::buildQuery(QCLuceneBooleanQuery &booleanQuery,
return true;
}
-bool QHelpSearchIndexReader::buildTryHarderQuery(QCLuceneBooleanQuery &booleanQuery,
+bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(QCLuceneBooleanQuery &booleanQuery,
const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer)
{
bool retVal = false;
@@ -367,7 +325,7 @@ bool QHelpSearchIndexReader::buildTryHarderQuery(QCLuceneBooleanQuery &booleanQu
return retVal;
}
-void QHelpSearchIndexReader::boostSearchHits(const QHelpEngineCore &engine,
+void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine,
QList<QHelpSearchEngine::SearchHit> &hitList, const QList<QHelpSearchQuery> &queryList)
{
foreach (const QHelpSearchQuery query, queryList) {
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
index 8876d80..93ac6a8 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
@@ -53,44 +53,24 @@
// We mean it.
//
-#include "qhelpsearchengine.h"
+#include "qhelpsearchindexreader_p.h"
#include "fulltextsearch/qanalyzer_p.h"
#include "fulltextsearch/qquery_p.h"
-#include <QtCore/QList>
-#include <QtCore/QMutex>
-#include <QtCore/QObject>
-#include <QtCore/QString>
-#include <QtCore/QThread>
-#include <QtCore/QWaitCondition>
-
-class QHelpEngineCore;
-
QT_BEGIN_NAMESPACE
namespace qt {
namespace fulltextsearch {
namespace clucene {
-class QHelpSearchIndexReader : public QThread
+class QHelpSearchIndexReaderClucene : public QHelpSearchIndexReader
{
Q_OBJECT
public:
- QHelpSearchIndexReader();
- ~QHelpSearchIndexReader();
-
- void cancelSearching();
- void search(const QString &collectionFile,
- const QString &indexFilesFolder,
- const QList<QHelpSearchQuery> &queryList);
- int hitsCount() const;
- QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const;
-
-signals:
- void searchingStarted();
- void searchingFinished(int hits);
+ QHelpSearchIndexReaderClucene();
+ ~QHelpSearchIndexReaderClucene();
private:
void run();
@@ -102,14 +82,6 @@ private:
const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer);
void boostSearchHits(const QHelpEngineCore &engine, QList<QHelpSearchEngine::SearchHit> &hitList,
const QList<QHelpSearchQuery> &queryList);
-
-private:
- mutable QMutex mutex;
- QList<QHelpSearchEngine::SearchHit> hitList;
- bool m_cancel;
- QString m_collectionFile;
- QList<QHelpSearchQuery> m_query;
- QString m_indexFilesFolder;
};
} // namespace clucene
diff --git a/tools/assistant/lib/qhelpsearchindexreader_default.cpp b/tools/assistant/lib/qhelpsearchindexreader_default.cpp
index 91af925..fbf8a09 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_default.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_default.cpp
@@ -492,56 +492,17 @@ void Reader::cleanupIndex(EntryTable &entryTable)
}
-QHelpSearchIndexReader::QHelpSearchIndexReader()
- : QThread()
- , m_cancel(false)
+QHelpSearchIndexReaderDefault::QHelpSearchIndexReaderDefault()
+ : QHelpSearchIndexReader()
{
// nothing todo
}
-QHelpSearchIndexReader::~QHelpSearchIndexReader()
+QHelpSearchIndexReaderDefault::~QHelpSearchIndexReaderDefault()
{
- mutex.lock();
- this->m_cancel = true;
- waitCondition.wakeOne();
- mutex.unlock();
-
- wait();
-}
-
-void QHelpSearchIndexReader::cancelSearching()
-{
- mutex.lock();
- this->m_cancel = true;
- mutex.unlock();
-}
-
-void QHelpSearchIndexReader::search(const QString &collectionFile,
- const QString &indexFilesFolder,
- const QList<QHelpSearchQuery> &queryList)
-{
- QMutexLocker lock(&mutex);
-
- this->hitList.clear();
- this->m_cancel = false;
- this->m_query = queryList;
- this->m_collectionFile = collectionFile;
- this->m_indexFilesFolder = indexFilesFolder;
-
- start(QThread::NormalPriority);
-}
-
-int QHelpSearchIndexReader::hitsCount() const
-{
- return hitList.count();
}
-QHelpSearchEngine::SearchHit QHelpSearchIndexReader::hit(int index) const
-{
- return hitList.at(index);
-}
-
-void QHelpSearchIndexReader::run()
+void QHelpSearchIndexReaderDefault::run()
{
mutex.lock();
@@ -571,7 +532,7 @@ void QHelpSearchIndexReader::run()
QHelpEngineCore engine(collectionFile, 0);
if (!engine.setupData())
return;
-
+
const QStringList registeredDocs = engine.registeredDocumentations();
const QStringList indexedNamespaces = engine.customValue(key).toString().
split(QLatin1String("|"), QString::SkipEmptyParts);
diff --git a/tools/assistant/lib/qhelpsearchindexreader_default_p.h b/tools/assistant/lib/qhelpsearchindexreader_default_p.h
index f0e59b4..d21fc08 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_default_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_default_p.h
@@ -54,19 +54,10 @@
//
#include "qhelpsearchindex_default_p.h"
-#include "qhelpsearchengine.h"
+#include "qhelpsearchindexreader_p.h"
#include <QtCore/QHash>
#include <QtCore/QPair>
-#include <QtCore/QList>
-#include <QtCore/QMutex>
-#include <QtCore/QString>
-#include <QtCore/QThread>
-#include <QtCore/QObject>
-#include <QtCore/QVector>
-#include <QtCore/QByteArray>
-#include <QtCore/QStringList>
-#include <QtCore/QWaitCondition>
QT_BEGIN_NAMESPACE
@@ -121,39 +112,19 @@ private:
};
-class QHelpSearchIndexReader : public QThread
+class QHelpSearchIndexReaderDefault : public QHelpSearchIndexReader
{
Q_OBJECT
public:
- QHelpSearchIndexReader();
- ~QHelpSearchIndexReader();
-
- void cancelSearching();
- void search(const QString &collectionFile,
- const QString &indexFilesFolder,
- const QList<QHelpSearchQuery> &queryList);
-
- int hitsCount() const;
- QHelpSearchEngine::SearchHit hit(int index) const;
-
-signals:
- void searchingStarted();
- void searchingFinished(int hits);
+ QHelpSearchIndexReaderDefault();
+ ~QHelpSearchIndexReaderDefault();
private:
void run();
private:
- QMutex mutex;
Reader m_reader;
- QWaitCondition waitCondition;
- QList<QHelpSearchEngine::SearchHit> hitList;
-
- bool m_cancel;
- QList<QHelpSearchQuery> m_query;
- QString m_collectionFile;
- QString m_indexFilesFolder;
};
} // namespace std
diff --git a/tools/assistant/lib/qhelpsearchindexreader_p.h b/tools/assistant/lib/qhelpsearchindexreader_p.h
new file mode 100644
index 0000000..c8f2b44
--- /dev/null
+++ b/tools/assistant/lib/qhelpsearchindexreader_p.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://www.qtsoftware.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QHELPSEARCHINDEXREADER_H
+#define QHELPSEARCHINDEXREADER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the help generator tools. This header file may change from version
+// to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qhelpsearchengine.h"
+
+#include <QtCore/QList>
+#include <QtCore/QMutex>
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <QtCore/QThread>
+#include <QtCore/QWaitCondition>
+
+QT_BEGIN_NAMESPACE
+
+class QHelpEngineCore;
+
+namespace qt {
+ namespace fulltextsearch {
+
+class QHelpSearchIndexReader : public QThread
+{
+ Q_OBJECT
+
+public:
+ QHelpSearchIndexReader();
+ ~QHelpSearchIndexReader();
+
+ void cancelSearching();
+ void search(const QString &collectionFile,
+ const QString &indexFilesFolder,
+ const QList<QHelpSearchQuery> &queryList);
+ int hitsCount() const;
+ QList<QHelpSearchEngine::SearchHit> hits(int start, int end) const;
+
+signals:
+ void searchingStarted();
+ void searchingFinished(int hits);
+
+protected:
+ mutable QMutex mutex;
+ QList<QHelpSearchEngine::SearchHit> hitList;
+ bool m_cancel;
+ QString m_collectionFile;
+ QList<QHelpSearchQuery> m_query;
+ QString m_indexFilesFolder;
+
+private:
+ virtual void run()=0;
+};
+
+ } // namespace fulltextsearch
+} // namespace qt
+
+QT_END_NAMESPACE
+
+#endif // QHELPSEARCHINDEXREADER_H
diff --git a/tools/assistant/tools/qhelpconverter/adpreader.cpp b/tools/assistant/tools/qhelpconverter/adpreader.cpp
index 35f8878..c427038 100644
--- a/tools/assistant/tools/qhelpconverter/adpreader.cpp
+++ b/tools/assistant/tools/qhelpconverter/adpreader.cpp
@@ -39,8 +39,16 @@
**
****************************************************************************/
+#include <QRegExp>
+
#include "adpreader.h"
+static bool versionIsAtLeast320(const QString &version)
+{
+ return QRegExp("\\d.\\d\\.\\d").exactMatch(version)
+ && (version[0] > '3' || (version[0] == '3' && version[2] >= '2'));
+}
+
QT_BEGIN_NAMESPACE
void AdpReader::readData(const QByteArray &contents)
@@ -51,11 +59,11 @@ void AdpReader::readData(const QByteArray &contents)
m_properties.clear();
m_files.clear();
addData(contents);
- while (!atEnd()) {
- readNext();
- if (isStartElement()) {
+ while (!atEnd()) {
+ readNext();
+ if (isStartElement()) {
if (name().toString().toLower() == QLatin1String("assistantconfig")
- && attributes().value(QLatin1String("version")) == QLatin1String("3.2.0")) {
+ && versionIsAtLeast320(attributes().value(QLatin1String("version")).toString())) {
readProject();
} else if (name().toString().toLower() == QLatin1String("dcf")) {
QString ref = attributes().value(QLatin1String("ref")).toString();
@@ -66,8 +74,8 @@ void AdpReader::readData(const QByteArray &contents)
} else {
raiseError();
}
- }
- }
+ }
+ }
}
QList<ContentItem> AdpReader::contents() const
diff --git a/tools/assistant/tools/qhelpconverter/adpreader.h b/tools/assistant/tools/qhelpconverter/adpreader.h
index f2e7509..740a462 100644
--- a/tools/assistant/tools/qhelpconverter/adpreader.h
+++ b/tools/assistant/tools/qhelpconverter/adpreader.h
@@ -50,15 +50,15 @@ QT_BEGIN_NAMESPACE
struct ContentItem {
ContentItem(const QString &t, const QString &r, int d)
- : title(t), reference(r), depth(d) {}
+ : title(t), reference(r), depth(d) {}
QString title;
QString reference;
- int depth;
+ int depth;
};
struct KeywordItem {
KeywordItem(const QString &k, const QString &r)
- : keyword(k), reference(r) {}
+ : keyword(k), reference(r) {}
QString keyword;
QString reference;
};
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 728527d..c3da1e5 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3121,7 +3121,9 @@ void Configure::buildQmake()
void Configure::buildHostTools()
{
- dictionary[ "DONE" ] = "yes";
+ if (dictionary[ "NOPROCESS" ] == "yes")
+ dictionary[ "DONE" ] = "yes";
+
if (!dictionary.contains("XQMAKESPEC"))
return;
@@ -3352,8 +3354,16 @@ void Configure::generateMakefiles()
void Configure::showSummary()
{
QString make = dictionary[ "MAKE" ];
- cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl;
- cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
+ if (!dictionary.contains("XQMAKESPEC")) {
+ cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl;
+ cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
+ } else {
+ // we are cross compiling for Windows CE
+ cout << endl << endl << "Qt is now configured for building. To start the build run:" << endl
+ << "\tsetcepaths " << dictionary.value("XQMAKESPEC") << endl
+ << "\t" << qPrintable(make) << endl
+ << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
+ }
}
Configure::ProjectType Configure::projectType( const QString& proFileName )
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index f43b527..5b22a86 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -1381,6 +1381,24 @@ bool QDesignerPropertySheet::isFakeLayoutProperty(int index) const
return false;
}
+// Determine the "designable" state of a property. Properties, which have
+// a per-object boolean test function that returns false are shown in
+// disabled state ("checked" depending on "checkable", etc.)
+// Properties, which are generally not designable independent
+// of the object are not shown at all.
+enum DesignableState { PropertyIsDesignable,
+ // Object has a Designable test function that returns false.
+ PropertyOfObjectNotDesignable,
+ PropertyNotDesignable };
+
+static inline DesignableState designableState(const QDesignerMetaPropertyInterface *p, const QObject *object)
+{
+ if (p->attributes(object) & QDesignerMetaPropertyInterface::DesignableAttribute)
+ return PropertyIsDesignable;
+ return (p->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute) ?
+ PropertyOfObjectNotDesignable : PropertyNotDesignable;
+}
+
bool QDesignerPropertySheet::isVisible(int index) const
{
if (d->invalidIndex(Q_FUNC_INFO, index))
@@ -1450,9 +1468,8 @@ bool QDesignerPropertySheet::isVisible(int index) const
if (!(p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess))
return false;
- // Enabled handling
- return (p->attributes(d->m_object) & QDesignerMetaPropertyInterface::DesignableAttribute) ||
- (p->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute);
+ // Enabled handling: Hide only statically not designable properties
+ return designableState(p, d->m_object) != PropertyNotDesignable;
}
void QDesignerPropertySheet::setVisible(int index, bool visible)
@@ -1482,9 +1499,12 @@ bool QDesignerPropertySheet::isEnabled(int index) const
if (d->m_info.value(index).visible == true) // Sun CC 5.5 oddity, wants true
return true;
+ // Enable setting of properties for statically non-designable properties
+ // as this might be done via TaskMenu/Cursor::setProperty. Note that those
+ // properties are not visible.
const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
return (p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess) &&
- (p->attributes(d->m_object) & QDesignerMetaPropertyInterface::DesignableAttribute);
+ designableState(p, d->m_object) != PropertyOfObjectNotDesignable;
}
bool QDesignerPropertySheet::isAttribute(int index) const
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index e2acbbb..414dfb7 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -521,7 +521,8 @@ int main(int argc, char **argv)
for (QStringList::iterator it = sourceFiles.begin(); it != sourceFiles.end(); ++it) {
if (it->endsWith(QLatin1String(".java"), Qt::CaseInsensitive))
loadJava(fetchedTor, *it, cd);
- else if (it->endsWith(QLatin1String(".ui"), Qt::CaseInsensitive))
+ else if (it->endsWith(QLatin1String(".ui"), Qt::CaseInsensitive)
+ || it->endsWith(QLatin1String(".jui"), Qt::CaseInsensitive))
loadUI(fetchedTor, *it, cd);
else if (it->endsWith(QLatin1String(".js"), Qt::CaseInsensitive)
|| it->endsWith(QLatin1String(".qs"), Qt::CaseInsensitive))
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index bb96d55..b1f8167 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1917,6 +1917,9 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
foreach (const QString &name, nodeMap.keys()) {
const Node *node = nodeMap[name];
+ if (node->status() == Node::Obsolete)
+ continue;
+
if (++row % 2 == 1)
out() << "<tr valign=\"top\" class=\"odd\">";
else
@@ -3021,7 +3024,9 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
}
#endif
-void HtmlGenerator::generateLink(const Atom *atom, const Node * /* relative */, CodeMarker *marker)
+void HtmlGenerator::generateLink(const Atom* atom,
+ const Node* /* relative */,
+ CodeMarker* marker)
{
static QRegExp camelCase("[A-Z][A-Z][a-z]|[a-z][A-Z0-9]|_");
@@ -3621,6 +3626,7 @@ QString HtmlGenerator::getLink(const Atom *atom,
{
QString link;
*node = 0;
+ inObsoleteLink = false;
if (atom->string().contains(":") &&
(atom->string().startsWith("file:")
@@ -3672,9 +3678,19 @@ QString HtmlGenerator::getLink(const Atom *atom,
if (relative) {
if (relative->parent() != *node) {
if (relative->status() != Node::Obsolete) {
- relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
- .arg(atom->string())
- .arg(marker->plainFullName(relative)));
+ bool porting = false;
+ if (relative->type() == Node::Fake) {
+ const FakeNode* fake = static_cast<const FakeNode*>(relative);
+ if (fake->title().startsWith("Porting"))
+ porting = true;
+ }
+ QString name = marker->plainFullName(relative);
+ if (!porting && !name.startsWith("Q3")) {
+ relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
+ .arg(atom->string())
+ .arg(name));
+ inObsoleteLink = true;
+ }
#if 0
qDebug() << "Link to Obsolete entity"
<< (*node)->name();
@@ -3830,10 +3846,14 @@ void HtmlGenerator::endLink()
out() << "</i>";
}
else {
+ if (inObsoleteLink) {
+ out() << "<sup>(obsolete)</sup>";
+ }
out() << "</a>";
}
}
inLink = false;
+ inObsoleteLink = false;
}
QT_END_NAMESPACE
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index a330d0c..180c307 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -249,6 +249,7 @@ class HtmlGenerator : public PageGenerator
DcfSection dcfQmakeRoot;
HelpProjectWriter *helpProjectWriter;
bool inLink;
+ bool inObsoleteLink;
bool inContents;
bool inSectionHeading;
bool inTableHeader;