summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--dist/changes-5.10.022
-rw-r--r--examples/xmlpatterns/filetree/filetree.pro5
-rw-r--r--examples/xmlpatterns/recipes/forms/querywidget_mobiles.ui87
-rw-r--r--examples/xmlpatterns/recipes/querymainwindow.cpp17
-rw-r--r--examples/xmlpatterns/recipes/querymainwindow.h8
-rw-r--r--examples/xmlpatterns/recipes/recipes.pro6
-rw-r--r--examples/xmlpatterns/schema/mainwindow.h6
-rw-r--r--examples/xmlpatterns/schema/schema.pro5
-rw-r--r--examples/xmlpatterns/schema/schema_mobiles.ui130
-rw-r--r--examples/xmlpatterns/shared/xmlsyntaxhighlighter.h2
-rw-r--r--examples/xmlpatterns/xquery/xquery.pro2
-rw-r--r--src/xmlpatterns/expr/qexpressionsequence.cpp10
-rw-r--r--src/xmlpatterns/functions/qconstructorfunctionsfactory.cpp5
-rw-r--r--src/xmlpatterns/functions/qfunctionfactorycollection.cpp5
-rw-r--r--src/xmlpatterns/xmlpatterns.pro9
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp7
-rw-r--r--tools/xmlpatterns/xmlpatterns.pro1
-rw-r--r--tools/xmlpatternsvalidator/xmlpatternsvalidator.pro1
19 files changed, 54 insertions, 276 deletions
diff --git a/.qmake.conf b/.qmake.conf
index dea15b4..168dab9 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 5.9.3
+MODULE_VERSION = 5.10.0
diff --git a/dist/changes-5.10.0 b/dist/changes-5.10.0
new file mode 100644
index 0000000..6847eb8
--- /dev/null
+++ b/dist/changes-5.10.0
@@ -0,0 +1,22 @@
+Qt 5.10 introduces many new features and improvements as well as bugfixes
+over the 5.9.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.10 series is binary compatible with the 5.10.x series.
+Applications compiled for 5.9 will continue to run with 5.10.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Qt 5.10.0 Changes *
+****************************************************************************
+
+ - This release contains only minor code improvements.
diff --git a/examples/xmlpatterns/filetree/filetree.pro b/examples/xmlpatterns/filetree/filetree.pro
index 4b7d5f8..cb78c40 100644
--- a/examples/xmlpatterns/filetree/filetree.pro
+++ b/examples/xmlpatterns/filetree/filetree.pro
@@ -7,8 +7,3 @@ INCLUDEPATH += ../shared/
target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/filetree
INSTALLS += target
-
-maemo5: CONFIG += qt_example
-
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/xmlpatterns/recipes/forms/querywidget_mobiles.ui b/examples/xmlpatterns/recipes/forms/querywidget_mobiles.ui
deleted file mode 100644
index b4600e9..0000000
--- a/examples/xmlpatterns/recipes/forms/querywidget_mobiles.ui
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>QueryWidget</class>
- <widget class="QMainWindow" name="QueryWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>453</width>
- <height>583</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Recipes XQuery Example</string>
- </property>
- <widget class="QWidget" name="centralwidget">
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <property name="tabsClosable">
- <bool>false</bool>
- </property>
- <widget class="QWidget" name="tab_1">
- <attribute name="title">
- <string>Input Document</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTextBrowser" name="inputTextEdit">
- <property name="textInteractionFlags">
- <set>Qt::NoTextInteraction</set>
- </property>
- <property name="openLinks">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab_2">
- <attribute name="title">
- <string>Query selection</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QComboBox" name="defaultQueries"/>
- </item>
- <item>
- <widget class="QTextBrowser" name="queryTextEdit">
- <property name="textInteractionFlags">
- <set>Qt::NoTextInteraction</set>
- </property>
- <property name="openLinks">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab_3">
- <attribute name="title">
- <string>Output Document</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <widget class="QTextBrowser" name="outputTextEdit">
- <property name="textInteractionFlags">
- <set>Qt::NoTextInteraction</set>
- </property>
- <property name="openLinks">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/xmlpatterns/recipes/querymainwindow.cpp b/examples/xmlpatterns/recipes/querymainwindow.cpp
index f73e5de..b968d28 100644
--- a/examples/xmlpatterns/recipes/querymainwindow.cpp
+++ b/examples/xmlpatterns/recipes/querymainwindow.cpp
@@ -48,15 +48,15 @@
**
****************************************************************************/
-#include <QMessageBox>
-#include <QFileDialog>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QFileDialog>
#include <QtXmlPatterns>
#include "querymainwindow.h"
#include "xmlsyntaxhighlighter.h"
//! [0]
-QueryMainWindow::QueryMainWindow() : ui_defaultQueries(0)
+QueryMainWindow::QueryMainWindow()
{
setupUi(this);
@@ -65,14 +65,15 @@ QueryMainWindow::QueryMainWindow() : ui_defaultQueries(0)
ui_defaultQueries = findChild<QComboBox*>("defaultQueries");
QMetaObject::connectSlotsByName(this);
- connect(ui_defaultQueries, SIGNAL(currentIndexChanged(int)), SLOT(displayQuery(int)));
+
+ connect(ui_defaultQueries, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &QueryMainWindow::displayQuery);
loadInputFile();
const QStringList queries(QDir(":/files/", "*.xq").entryList());
- int len = queries.count();
- for(int i = 0; i < len; ++i)
- ui_defaultQueries->addItem(queries.at(i));
- if (len > 0)
+ for (const auto &query : queries)
+ ui_defaultQueries->addItem(query);
+ if (queries.count() > 0)
displayQuery(0);
}
//! [0]
diff --git a/examples/xmlpatterns/recipes/querymainwindow.h b/examples/xmlpatterns/recipes/querymainwindow.h
index 247ca61..215dc64 100644
--- a/examples/xmlpatterns/recipes/querymainwindow.h
+++ b/examples/xmlpatterns/recipes/querymainwindow.h
@@ -53,11 +53,7 @@
#include <QMainWindow>
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- #include "ui_querywidget_mobiles.h"
-#else
- #include "ui_querywidget.h"
-#endif
+#include "ui_querywidget.h"
QT_BEGIN_NAMESPACE
class QComboBox;
@@ -76,7 +72,7 @@ public slots:
void displayQuery(int index);
private:
- QComboBox* ui_defaultQueries;
+ QComboBox *ui_defaultQueries = nullptr;
void evaluate(const QString &str);
void loadInputFile();
diff --git a/examples/xmlpatterns/recipes/recipes.pro b/examples/xmlpatterns/recipes/recipes.pro
index 633138b..b564e0a 100644
--- a/examples/xmlpatterns/recipes/recipes.pro
+++ b/examples/xmlpatterns/recipes/recipes.pro
@@ -1,6 +1,5 @@
QT += widgets xmlpatterns
-FORMS += forms/querywidget.ui \
- forms/querywidget_mobiles.ui
+FORMS += forms/querywidget.ui
HEADERS = querymainwindow.h ../shared/xmlsyntaxhighlighter.h
RESOURCES = recipes.qrc
SOURCES = main.cpp querymainwindow.cpp ../shared/xmlsyntaxhighlighter.cpp
@@ -8,6 +7,3 @@ INCLUDEPATH += ../shared/
target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/recipes
INSTALLS += target
-
-maemo5: CONFIG += qt_example
-
diff --git a/examples/xmlpatterns/schema/mainwindow.h b/examples/xmlpatterns/schema/mainwindow.h
index 8ff875d..5abda84 100644
--- a/examples/xmlpatterns/schema/mainwindow.h
+++ b/examples/xmlpatterns/schema/mainwindow.h
@@ -53,11 +53,7 @@
#include <QMainWindow>
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- #include "ui_schema_mobiles.h"
-#else
- #include "ui_schema.h"
-#endif
+#include "ui_schema.h"
//! [0]
class MainWindow : public QMainWindow,
diff --git a/examples/xmlpatterns/schema/schema.pro b/examples/xmlpatterns/schema/schema.pro
index dd56375..ded65a1 100644
--- a/examples/xmlpatterns/schema/schema.pro
+++ b/examples/xmlpatterns/schema/schema.pro
@@ -1,5 +1,5 @@
QT += widgets xmlpatterns
-FORMS += schema.ui schema_mobiles.ui
+FORMS += schema.ui
HEADERS = mainwindow.h ../shared/xmlsyntaxhighlighter.h
RESOURCES = schema.qrc
SOURCES = main.cpp mainwindow.cpp ../shared/xmlsyntaxhighlighter.cpp
@@ -7,6 +7,3 @@ INCLUDEPATH += ../shared/
target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/schema
INSTALLS += target
-
-maemo5: CONFIG += qt_example
-
diff --git a/examples/xmlpatterns/schema/schema_mobiles.ui b/examples/xmlpatterns/schema/schema_mobiles.ui
deleted file mode 100644
index 009d0aa..0000000
--- a/examples/xmlpatterns/schema/schema_mobiles.ui
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SchemaMainWindow</class>
- <widget class="QMainWindow" name="SchemaMainWindow">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>187</width>
- <height>179</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>XML Schema Validation</string>
- </property>
- <widget class="QWidget" name="centralwidget">
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="sizeConstraint">
- <enum>QLayout::SetNoConstraint</enum>
- </property>
- <item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="currentIndex">
- <number>1</number>
- </property>
- <widget class="QWidget" name="tab">
- <attribute name="title">
- <string>XML Schema</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QComboBox" name="schemaSelection">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maxVisibleItems">
- <number>3</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTextBrowser" name="schemaView"/>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab_2">
- <attribute name="title">
- <string>XML Instance</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="sizeConstraint">
- <enum>QLayout::SetNoConstraint</enum>
- </property>
- <item>
- <widget class="QComboBox" name="instanceSelection">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maxVisibleItems">
- <number>3</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTextBrowser" name="instanceEdit">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="readOnly">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="validationStatus">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Not validated</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="validateButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Validate</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h
index eace6be..63c1874 100644
--- a/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h
+++ b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h
@@ -57,7 +57,7 @@
class XmlSyntaxHighlighter : public QSyntaxHighlighter
{
public:
- XmlSyntaxHighlighter(QTextDocument *parent = 0);
+ explicit XmlSyntaxHighlighter(QTextDocument *parent = nullptr);
protected:
virtual void highlightBlock(const QString &text);
diff --git a/examples/xmlpatterns/xquery/xquery.pro b/examples/xmlpatterns/xquery/xquery.pro
index ee1c9c8..09d0c4d 100644
--- a/examples/xmlpatterns/xquery/xquery.pro
+++ b/examples/xmlpatterns/xquery/xquery.pro
@@ -1,4 +1,2 @@
TEMPLATE = aux
EXAMPLE_FILES = globalVariables
-
-maemo5: CONFIG += qt_example
diff --git a/src/xmlpatterns/expr/qexpressionsequence.cpp b/src/xmlpatterns/expr/qexpressionsequence.cpp
index 193e15f..d796de4 100644
--- a/src/xmlpatterns/expr/qexpressionsequence.cpp
+++ b/src/xmlpatterns/expr/qexpressionsequence.cpp
@@ -46,6 +46,9 @@
#include "qexpressionsequence_p.h"
+#include <algorithm>
+#include <iterator>
+
QT_BEGIN_NAMESPACE
using namespace QPatternist;
@@ -109,11 +112,8 @@ Expression::Ptr ExpressionSequence::compress(const StaticContext::Ptr &context)
else if(Id == IDExpressionSequence)
{
/* Rewrite "(1, (2, 3), 4)" into "(1, 2, 3, 4)" */
- Expression::List::const_iterator seqIt((*it)->operands().constBegin());
- const Expression::List::const_iterator seqEnd((*it)->operands().constEnd());
-
- for(; seqIt != seqEnd; ++seqIt)
- result.append(*seqIt);
+ const auto &operands = (*it)->operands();
+ std::copy(operands.cbegin(), operands.cend(), std::back_inserter(result));
} else if (Id == IDLiteralSequence) {
/* Rewrite "(1, (2, 3), 4)" into "(1, 2, 3, 4)" */
// Note: LiteralSequence does not use the dynamic context, so we pass in a nullptr.
diff --git a/src/xmlpatterns/functions/qconstructorfunctionsfactory.cpp b/src/xmlpatterns/functions/qconstructorfunctionsfactory.cpp
index 67c9e84..10d5829 100644
--- a/src/xmlpatterns/functions/qconstructorfunctionsfactory.cpp
+++ b/src/xmlpatterns/functions/qconstructorfunctionsfactory.cpp
@@ -58,8 +58,9 @@ ConstructorFunctionsFactory::ConstructorFunctionsFactory(const NamePool::Ptr &np
{
Q_ASSERT(m_typeFactory);
Q_ASSERT(np);
- SchemaType::Hash::const_iterator it(m_typeFactory->types().constBegin());
- const SchemaType::Hash::const_iterator end(m_typeFactory->types().constEnd());
+ const auto &schemaHash = m_typeFactory->types();
+ SchemaType::Hash::const_iterator it(schemaHash.constBegin());
+ const SchemaType::Hash::const_iterator end(schemaHash.constEnd());
FunctionArgument::List args;
const QXmlName argName(StandardNamespaces::empty, StandardLocalNames::sourceValue);
diff --git a/src/xmlpatterns/functions/qfunctionfactorycollection.cpp b/src/xmlpatterns/functions/qfunctionfactorycollection.cpp
index 6c10425..1deb3cc 100644
--- a/src/xmlpatterns/functions/qfunctionfactorycollection.cpp
+++ b/src/xmlpatterns/functions/qfunctionfactorycollection.cpp
@@ -92,8 +92,9 @@ FunctionSignature::Hash FunctionFactoryCollection::functionSignatures() const
for(const_iterator it(constBegin()); it != e; ++it)
{
- const FunctionSignature::Hash::const_iterator e2((*it)->functionSignatures().constEnd());
- FunctionSignature::Hash::const_iterator sit((*it)->functionSignatures().constBegin());
+ const auto &signatures = (*it)->functionSignatures();
+ const FunctionSignature::Hash::const_iterator e2(signatures.constEnd());
+ FunctionSignature::Hash::const_iterator sit(signatures.constBegin());
for(; sit != e2; ++sit)
result.insert(sit.key(), sit.value());
diff --git a/src/xmlpatterns/xmlpatterns.pro b/src/xmlpatterns/xmlpatterns.pro
index 5244bb1..eae2ea8 100644
--- a/src/xmlpatterns/xmlpatterns.pro
+++ b/src/xmlpatterns/xmlpatterns.pro
@@ -26,13 +26,4 @@ include($$PWD/type/type.pri)
include($$PWD/utils/utils.pri)
include($$PWD/qobjectmodel/qobjectmodel.pri, "", true)
-wince* {
- # The Microsoft MIPS compiler crashes if /Og is specified.
- # -O2/1 expands to /Og plus additional arguments.
- contains(DEFINES, MIPS) {
- QMAKE_CXXFLAGS_RELEASE ~= s/-O2/-Oi -Ot -Oy -Ob2/
- QMAKE_CXXFLAGS_RELEASE ~= s/-O1/-Os -Oy -Ob2/
- }
-}
-
load(qt_module)
diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp
index a7f3e8b..df4b955 100644
--- a/tests/auto/qxmlquery/tst_qxmlquery.cpp
+++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp
@@ -1391,13 +1391,12 @@ void tst_QXmlQuery::relativeBaseURI() const
QVERIFY(!appPath.isRelative());
QFileInfo dir(appPath.toLocalFile());
- dir.setFile(QString());
/* We can't use QUrl::isParentOf() because it doesn't do what we want it to */
- if(!loaded.toLocalFile().startsWith(dir.absoluteFilePath()))
- QTextStream(stderr) << "dir.absoluteFilePath():" << dir.absoluteFilePath() << "loaded.toLocalFile():" << loaded.toLocalFile();
+ if (!loaded.toLocalFile().startsWith(dir.absolutePath()))
+ QTextStream(stderr) << "dir.absolutePath():" << dir.absolutePath() << "loaded.toLocalFile():" << loaded.toLocalFile();
- checkBaseURI(loaded, dir.absoluteFilePath());
+ checkBaseURI(loaded, dir.absolutePath());
}
void tst_QXmlQuery::emptyBaseURI() const
diff --git a/tools/xmlpatterns/xmlpatterns.pro b/tools/xmlpatterns/xmlpatterns.pro
index 0f1ee4f..5ab4236 100644
--- a/tools/xmlpatterns/xmlpatterns.pro
+++ b/tools/xmlpatterns/xmlpatterns.pro
@@ -11,6 +11,7 @@ HEADERS = main.h \
qapplicationargument.cpp \
qapplicationargumentparser.cpp
+QMAKE_TARGET_DESCRIPTION = "Qt XQuery Evaluator"
load(qt_tool)
# with c++11 / __STRICT_ANSI__ mingw.org stdio.h doesn't declare e.g. _fileno
diff --git a/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro b/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro
index af9469f..beb9bdd 100644
--- a/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro
+++ b/tools/xmlpatternsvalidator/xmlpatternsvalidator.pro
@@ -3,4 +3,5 @@ QT = core xmlpatterns
SOURCES = main.cpp
HEADERS = main.h
+QMAKE_TARGET_DESCRIPTION = "Qt XML Schema Validator"
load(qt_tool)