From 10ddd5a745704f058a668e56a41e84ba2e8282da Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Sun, 17 Aug 2014 00:40:50 +0200 Subject: Add missing private headers warning Change-Id: Iaac8c5129451d958d4e8d90ed6bbae80ed6c8755 Reviewed-by: Mitch Curtis --- src/xmlpatterns/acceltree/qacceltreebuilder_tpl_p.h | 11 +++++++++++ src/xmlpatterns/data/qabstractfloat_tpl_p.h | 11 +++++++++++ src/xmlpatterns/data/qabstractfloatcasters_tpl_p.h | 11 +++++++++++ src/xmlpatterns/data/qabstractfloatmathematician_tpl_p.h | 11 +++++++++++ src/xmlpatterns/environment/qstackcontextbase_tpl_p.h | 11 +++++++++++ src/xmlpatterns/expr/qcastingplatform_tpl_p.h | 11 +++++++++++ src/xmlpatterns/expr/qcomparisonplatform_tpl_p.h | 11 +++++++++++ src/xmlpatterns/expr/qevaluationcache_tpl_p.h | 11 +++++++++++ src/xmlpatterns/functions/qcomparingaggregator_tpl_p.h | 11 +++++++++++ src/xmlpatterns/functions/qdatetimefns_tpl_p.h | 11 +++++++++++ src/xmlpatterns/parser/qmaintainingreader_tpl_p.h | 11 +++++++++++ src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h | 11 +++++++++++ src/xmlpatterns/schema/qxsduserschematype_tpl_p.h | 11 +++++++++++ src/xmlpatterns/type/qbuiltinnodetype_tpl_p.h | 11 +++++++++++ 14 files changed, 154 insertions(+) diff --git a/src/xmlpatterns/acceltree/qacceltreebuilder_tpl_p.h b/src/xmlpatterns/acceltree/qacceltreebuilder_tpl_p.h index fb342d8..21a1796 100644 --- a/src/xmlpatterns/acceltree/qacceltreebuilder_tpl_p.h +++ b/src/xmlpatterns/acceltree/qacceltreebuilder_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qacceltreebuilder_p.h. diff --git a/src/xmlpatterns/data/qabstractfloat_tpl_p.h b/src/xmlpatterns/data/qabstractfloat_tpl_p.h index 8a695f3..4cd9e38 100644 --- a/src/xmlpatterns/data/qabstractfloat_tpl_p.h +++ b/src/xmlpatterns/data/qabstractfloat_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qabstractfloat_p.h. diff --git a/src/xmlpatterns/data/qabstractfloatcasters_tpl_p.h b/src/xmlpatterns/data/qabstractfloatcasters_tpl_p.h index e11ad8d..47975ae 100644 --- a/src/xmlpatterns/data/qabstractfloatcasters_tpl_p.h +++ b/src/xmlpatterns/data/qabstractfloatcasters_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /* * NOTE: This file is included by qabstractfloatcasters_p.h * if you need some includes, put them in qabstractfloatcasters_p.h (outside of the namespace) diff --git a/src/xmlpatterns/data/qabstractfloatmathematician_tpl_p.h b/src/xmlpatterns/data/qabstractfloatmathematician_tpl_p.h index f9d5146..9afd3c8 100644 --- a/src/xmlpatterns/data/qabstractfloatmathematician_tpl_p.h +++ b/src/xmlpatterns/data/qabstractfloatmathematician_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /* * @file * @short This file is included by qatomicmathematicians_p.h diff --git a/src/xmlpatterns/environment/qstackcontextbase_tpl_p.h b/src/xmlpatterns/environment/qstackcontextbase_tpl_p.h index 53153ab..6a02df2 100644 --- a/src/xmlpatterns/environment/qstackcontextbase_tpl_p.h +++ b/src/xmlpatterns/environment/qstackcontextbase_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qstackcontextbase_p.h. diff --git a/src/xmlpatterns/expr/qcastingplatform_tpl_p.h b/src/xmlpatterns/expr/qcastingplatform_tpl_p.h index 17f0352..652482b 100644 --- a/src/xmlpatterns/expr/qcastingplatform_tpl_p.h +++ b/src/xmlpatterns/expr/qcastingplatform_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qcastingplatform_p.h. diff --git a/src/xmlpatterns/expr/qcomparisonplatform_tpl_p.h b/src/xmlpatterns/expr/qcomparisonplatform_tpl_p.h index 36f1773..b5a8ee8 100644 --- a/src/xmlpatterns/expr/qcomparisonplatform_tpl_p.h +++ b/src/xmlpatterns/expr/qcomparisonplatform_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qcomparisonplatform_p.h. diff --git a/src/xmlpatterns/expr/qevaluationcache_tpl_p.h b/src/xmlpatterns/expr/qevaluationcache_tpl_p.h index 336d863..225bf2d 100644 --- a/src/xmlpatterns/expr/qevaluationcache_tpl_p.h +++ b/src/xmlpatterns/expr/qevaluationcache_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qevaluationcache_p.h. diff --git a/src/xmlpatterns/functions/qcomparingaggregator_tpl_p.h b/src/xmlpatterns/functions/qcomparingaggregator_tpl_p.h index d73a958..7b8eab1 100644 --- a/src/xmlpatterns/functions/qcomparingaggregator_tpl_p.h +++ b/src/xmlpatterns/functions/qcomparingaggregator_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file qcomparingaggregator.cpp * @short This file is included by qcomparingaggregator_p.h. diff --git a/src/xmlpatterns/functions/qdatetimefns_tpl_p.h b/src/xmlpatterns/functions/qdatetimefns_tpl_p.h index 239d87a..0a55869 100644 --- a/src/xmlpatterns/functions/qdatetimefns_tpl_p.h +++ b/src/xmlpatterns/functions/qdatetimefns_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qdatetimefns_p.h. diff --git a/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h b/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h index 2e34296..62a3f54 100644 --- a/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h +++ b/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by qcastingplatform_p.h. diff --git a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h index 9ef5a45..79dd3c3 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h +++ b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /* * NOTE: This file is included by qxsdstatemachine_p.h * if you need some includes, put them in qxsdstatemachine_p.h (outside of the namespace) diff --git a/src/xmlpatterns/schema/qxsduserschematype_tpl_p.h b/src/xmlpatterns/schema/qxsduserschematype_tpl_p.h index 33ab8c0..471d48f 100644 --- a/src/xmlpatterns/schema/qxsduserschematype_tpl_p.h +++ b/src/xmlpatterns/schema/qxsduserschematype_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /* * NOTE: This file is included by qxsduserschematype_p.h * if you need some includes, put them in qxsduserschematype_p.h (outside of the namespace) diff --git a/src/xmlpatterns/type/qbuiltinnodetype_tpl_p.h b/src/xmlpatterns/type/qbuiltinnodetype_tpl_p.h index 169302c..45cfec7 100644 --- a/src/xmlpatterns/type/qbuiltinnodetype_tpl_p.h +++ b/src/xmlpatterns/type/qbuiltinnodetype_tpl_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /** * @file * @short This file is included by BuiltintNodeType.h. -- cgit v1.2.1 From 15d01c8031386d9e7d2572cca7797f3ce63d2663 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 29 Aug 2014 11:33:50 +0200 Subject: Bump version Change-Id: I0b33f04b08aec0d3c1745fb06796747973014100 --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index effef04..a118d53 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) CONFIG += qt_example_installs CONFIG += warning_clean -MODULE_VERSION = 5.3.2 +MODULE_VERSION = 5.3.3 -- cgit v1.2.1 From e228b5bd2f806a933afb7d0d328f3d226baff19e Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Wed, 17 Sep 2014 10:51:06 +0200 Subject: Remove qtdemo from gitignore QtDemo was removed with a commit in qtdoc. Change-Id: Id7c73ade6ba377aafc389bf1f11468d301438af3 Reviewed-by: Alessandro Portale --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index c66a88c..446d0d9 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,6 @@ bin/pixeltool* bin/qmake* bin/qdoc3* bin/qt3to4* -bin/qtdemo* bin/qttracereplay* bin/rcc* bin/uic* -- cgit v1.2.1 From eef0ba60200d8039c05073ce707c2352ac0944a8 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Wed, 3 Sep 2014 17:25:07 +0200 Subject: Don't spin a nested event loop for loading schemas synchronously over HTTP. Instead, use the internal synchronous load API in QNAM that relies on a separate thread with a blocking queued connection, just like QtWebKit does for synchronous XHR. FTP doesn't support this attribute, so we have to keep the event loop trick for that one. Change-Id: I785fa6d967160552b31778fcfc120d7ec4194a08 Reviewed-by: Jocelyn Turcotte --- .../acceltree/qacceltreeresourceloader.cpp | 20 ++++++++----- .../acceltree/qacceltreeresourceloader_p.h | 34 ---------------------- 2 files changed, 12 insertions(+), 42 deletions(-) diff --git a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp index 7c877c6..85ea41a 100644 --- a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp +++ b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp @@ -110,15 +110,20 @@ QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri, Q_ASSERT(networkManager); Q_ASSERT(uri.isValid()); - NetworkLoop networkLoop; - + const bool ftpSchemeUsed = (uri.scheme() == QStringLiteral("ftp")); + // QNAM doesn't have support for SynchronousRequestAttribute in its ftp backend. + QEventLoop ftpNetworkLoop; QNetworkRequest request(uri); + if (!ftpSchemeUsed) + request.setAttribute(QNetworkRequest::SynchronousRequestAttribute, true); QNetworkReply *const reply = networkManager->get(request); - networkLoop.connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(error(QNetworkReply::NetworkError))); - networkLoop.connect(reply, SIGNAL(finished()), SLOT(finished())); + if (ftpSchemeUsed) { + ftpNetworkLoop.connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(quit())); + ftpNetworkLoop.connect(reply, SIGNAL(finished()), SLOT(quit())); + ftpNetworkLoop.exec(QEventLoop::ExcludeUserInputEvents); + } - if(networkLoop.exec(QEventLoop::ExcludeUserInputEvents)) - { + if (reply->error() != QNetworkReply::NoError) { const QString errorMessage(escape(reply->errorString())); /* Note, we delete reply before we exit this function with error(). */ @@ -130,8 +135,7 @@ QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri, context->error(errorMessage, ReportContext::FODC0002, location); return 0; - } - else + } else return reply; } diff --git a/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h b/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h index 0adc8c8..7ac4389 100644 --- a/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h +++ b/src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h @@ -61,40 +61,6 @@ class QIODevice; namespace QPatternist { - /** - * @short An helper class which enables QNetworkAccessManager - * to be used in a blocking manner. - * - * @see AccelTreeResourceLoader::load() - * @author Frans Englich - */ - class NetworkLoop : public QEventLoop - { - Q_OBJECT - public: - NetworkLoop() : m_hasReceivedError(false) - { - } - - public Q_SLOTS: - void error(QNetworkReply::NetworkError code) - { - Q_UNUSED(code); - m_hasReceivedError = true; - exit(1); - } - - void finished() - { - if(m_hasReceivedError) - exit(1); - else - exit(0); - } - private: - bool m_hasReceivedError; - }; - /** * @short Handles requests for documents, and instantiates * them as AccelTree instances. -- cgit v1.2.1 From 5abd67e0645d2382861f86f6d3c6772e7727a811 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 8 Oct 2014 11:53:21 +0200 Subject: Polish schema example. Add some error handling, fix warning on startup: QIODevice::read: device not open caused by MainWindow::schemaSelected(0) which clears the instance combo causing the current index to temporarily change to -1. Change-Id: I213d68b07b2dee4e2bbc1404aaf149ce7c189713 Reviewed-by: Joerg Bornemann --- examples/xmlpatterns/schema/mainwindow.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/examples/xmlpatterns/schema/mainwindow.cpp b/examples/xmlpatterns/schema/mainwindow.cpp index 0de5309..bb18e38 100644 --- a/examples/xmlpatterns/schema/mainwindow.cpp +++ b/examples/xmlpatterns/schema/mainwindow.cpp @@ -130,8 +130,15 @@ void MainWindow::schemaSelected(int index) } textChanged(); - QFile schemaFile(QString(":/schema_%1.xsd").arg(index)); - schemaFile.open(QIODevice::ReadOnly); + const QString fileName = QStringLiteral(":/schema_") + + QString::number(index) + QStringLiteral(".xsd"); + QFile schemaFile(fileName); + if (!schemaFile.open(QIODevice::ReadOnly)) { + qWarning() << "Cannot open" << QDir::toNativeSeparators(fileName) + << ':' << schemaFile.errorString(); + return; + } + const QString schemaText(QString::fromUtf8(schemaFile.readAll())); schemaView->setPlainText(schemaText); @@ -142,8 +149,19 @@ void MainWindow::schemaSelected(int index) //! [2] void MainWindow::instanceSelected(int index) { - QFile instanceFile(QString(":/instance_%1.xml").arg((2*schemaSelection->currentIndex()) + index)); - instanceFile.open(QIODevice::ReadOnly); + if (index < 0) { + instanceEdit->setPlainText(QString()); + return; + } + const QString fileName = QStringLiteral(":/instance_") + + QString::number(2 * schemaSelection->currentIndex() + index) + + QStringLiteral(".xml"); + QFile instanceFile(fileName); + if (!instanceFile.open(QIODevice::ReadOnly)) { + qWarning() << "Cannot open" << QDir::toNativeSeparators(fileName) + << ':' << instanceFile.errorString(); + return; + } const QString instanceText(QString::fromUtf8(instanceFile.readAll())); instanceEdit->setPlainText(instanceText); -- cgit v1.2.1 From 045028f951959dc217a0fc1c19f014989bfaaa1f Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 8 Oct 2014 14:17:28 +0200 Subject: Doc: Applied title case to section1 titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-41250 Change-Id: I3155acb9a6813b0309de7fa0542f29c5a3a46b17 Reviewed-by: Topi Reiniƶ --- src/xmlpatterns/api/qxmlquery.cpp | 2 +- src/xmlpatterns/doc/src/xml-patterns.qdoc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp index f16ab91..2bacff3 100644 --- a/src/xmlpatterns/api/qxmlquery.cpp +++ b/src/xmlpatterns/api/qxmlquery.cpp @@ -123,7 +123,7 @@ QT_BEGIN_NAMESPACE running an XPath expression is the same as running an XQuery query. Pass the XPath expression to QXmlQuery using setQuery(). - \section1 Running XSLT stylesheets + \section1 Running XSLT Stylesheets Running an XSLT stylesheet is like running an XQuery, except that when you construct your QXmlQuery, you must pass QXmlQuery::XSLT20 diff --git a/src/xmlpatterns/doc/src/xml-patterns.qdoc b/src/xmlpatterns/doc/src/xml-patterns.qdoc index b231d62..540d325 100644 --- a/src/xmlpatterns/doc/src/xml-patterns.qdoc +++ b/src/xmlpatterns/doc/src/xml-patterns.qdoc @@ -55,7 +55,7 @@ Readers who are not familiar with the XQuery/XPath language can read \l {A Short Path to XQuery} for a brief introduction. - \section1 Advantages of using Qt XML Patterns and XQuery + \section1 Advantages of Using Qt XML Patterns and XQuery The XQuery/XPath language simplifies data searching and transformation tasks by eliminating the need for doing a lot of @@ -107,7 +107,7 @@ \endlist - \section1 Using the Qt XML Patterns module + \section1 Using the Qt XML Patterns Module There are two ways Qt XML Patterns can be used to evaluate queries. You can run the query engine in your Qt application using the @@ -546,7 +546,7 @@ See the QAbstractXmlNodeModel documentation for information about how to implement custom XML node models. - \section1 More on using Qt XML Patterns with non-XML Data + \section1 More on Using Qt XML Patterns with Non-XML Data Subclassing QAbstractXmlNodeModel to let the query engine access non-XML data by the same API it uses for XML is the feature that -- cgit v1.2.1