diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-21 10:07:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-21 10:07:35 +0200 |
commit | d26940d7769a35a517195079d7b402b0b6eb3c92 (patch) | |
tree | 3529e42d7bc3de903382a2dfc566b74675f188f0 | |
parent | 43c28d4084a2c3e63cf02f45c03c9514ee8af2a4 (diff) | |
parent | 54e7255eb18b1247d7cfda2d6bc120dc9c0f119b (diff) | |
download | qtxmlpatterns-d26940d7769a35a517195079d7b402b0b6eb3c92.tar.gz |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
Change-Id: If5ed6ad45422c7cf8a250e31a10ce2930e5c1cf7
-rw-r--r-- | dist/changes-5.9.1 | 24 | ||||
-rw-r--r-- | src/xmlpatterns/parser/qxquerytokenizer.cpp | 20 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h | 16 | ||||
-rw-r--r-- | tests/auto/xmlpatterns/tst_xmlpatterns.cpp | 10 |
4 files changed, 46 insertions, 24 deletions
diff --git a/dist/changes-5.9.1 b/dist/changes-5.9.1 new file mode 100644 index 0000000..60a7de0 --- /dev/null +++ b/dist/changes-5.9.1 @@ -0,0 +1,24 @@ +Qt 5.9.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0. + +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.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +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. + +**************************************************************************** +* Library * +**************************************************************************** + +- This release contains only minor code improvements. diff --git a/src/xmlpatterns/parser/qxquerytokenizer.cpp b/src/xmlpatterns/parser/qxquerytokenizer.cpp index a88e2d1..ab1cfdc 100644 --- a/src/xmlpatterns/parser/qxquerytokenizer.cpp +++ b/src/xmlpatterns/parser/qxquerytokenizer.cpp @@ -821,8 +821,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() } else return id; - - Q_ASSERT(false); } case NamespaceDecl: { @@ -848,8 +846,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return tokenAndChangeState(t->token, Default, 0); else return nc; - - Q_ASSERT(false); } case Axis: { @@ -1428,9 +1424,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return id; } } - - Q_ASSERT(false); - } case VarName: { @@ -1439,7 +1432,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() setState(Operator); return tokenizeNCNameOrQName(); - Q_ASSERT(false); } case ItemType: { @@ -1476,7 +1468,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return name; } } - Q_ASSERT(false); } case KindTest: { @@ -1521,7 +1512,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() } else return nc; - Q_ASSERT(false); } case KindTestForPI: { @@ -1538,7 +1528,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() default: return tokenizeNCName(); } - Q_ASSERT(false); } case OccurrenceIndicator: { @@ -1556,7 +1545,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return nextToken(); } } - Q_ASSERT(false); } case XQueryVersion: { @@ -1579,7 +1567,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return tokenAndChangeState(keyword->token, Default); else return id; - Q_ASSERT(false); } case StartTag: { @@ -1629,7 +1616,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() default: return tokenizeNCNameOrQName(); } - Q_ASSERT(false); } case AposAttributeContent: case QuotAttributeContent: @@ -1765,7 +1751,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() ++m_pos; } - Q_ASSERT(false); } case ElementContent: { @@ -1918,7 +1903,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() } ++m_pos; } - Q_ASSERT(false); } case ProcessingInstructionName: { @@ -1937,7 +1921,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() ProcessingInstructionContent); } } - Q_ASSERT(false); } case ProcessingInstructionContent: { @@ -1956,7 +1939,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() popState(); return Token(T_PI_CONTENT, normalizeEOL(m_data.mid(start, len), CharacterSkips())); } - Q_ASSERT(false); } case EndTag: { @@ -1970,7 +1952,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() } else return tokenizeNCNameOrQName(); - Q_ASSERT(false); } case XMLComment: { @@ -1992,7 +1973,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() else return error(); } - Q_ASSERT(false); } case Pragma: { diff --git a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h index 2583bb9..1cb2e72 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h +++ b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h @@ -111,7 +111,9 @@ template <typename TransitionType> void XsdStateMachine<TransitionType>::reset() { // reset the machine to the start state - for (auto it = m_states.cbegin(), end = m_states.cend(); it != end; ++it) { + auto it = m_states.cbegin(); + auto end = m_states.cend(); + for ( ; it != end; ++it) { if (it.value() == StartState || it.value() == StartEndState) { m_currentState = it.key(); return; @@ -175,7 +177,9 @@ bool XsdStateMachine<TransitionType>::proceed(InputType input) // fetch the transition entry for the current state const QHash<TransitionType, QVector<StateId> > &entry = m_transitions[m_currentState]; - for (auto it = entry.cbegin(), end = entry.cend(); it != end; ++it) { + auto it = entry.cbegin(); + auto end = entry.cend(); + for ( ; it != end; ++it) { if (inputEqualsTransition(input, it.key())) { m_currentState = it.value().first(); m_lastTransition = it.key(); @@ -212,7 +216,9 @@ TransitionType XsdStateMachine<TransitionType>::lastTransition() const template <typename TransitionType> typename XsdStateMachine<TransitionType>::StateId XsdStateMachine<TransitionType>::startState() const { - for (auto it = m_states.cbegin(), end = m_states.cend(); it != end; ++it) { + auto it = m_states.cbegin(); + auto end = m_states.cend(); + for ( ; it != end; ++it) { if (it.value() == StartState || it.value() == StartEndState) return it.key(); } @@ -339,7 +345,9 @@ XsdStateMachine<TransitionType> XsdStateMachine<TransitionType>::toDFA() const // search the start state as the algorithm starts with it... StateId startState = -1; - for (auto it = m_states.cbegin(), end = m_states.cend(); it != end; ++it) { + auto it = m_states.cbegin(); + auto end = m_states.cend(); + for ( ; it != end; ++it) { if (it.value() == StartState) { startState = it.key(); break; diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp index 8db61b9..e2f7337 100644 --- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp +++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp @@ -33,6 +33,10 @@ #include "../qxmlquery/TestFundament.h" #include "../network-settings.h" +#ifdef Q_OS_WIN +# include <qt_windows.h> +#endif + /*! \class tst_XmlPatterns \internal @@ -1043,6 +1047,12 @@ QString tst_XmlPatterns::filterStderr(const QString &in) for (const QRegExp& rx : irrelevant) out = out.remove(rx); +#ifdef Q_OS_WIN + // replace some Win32 error messages by standard Unix ones + out.replace(qt_error_string(ERROR_FILE_NOT_FOUND), "No such file or directory"); + out.replace(qt_error_string(ERROR_PATH_NOT_FOUND), "No such file or directory"); +#endif + return out; } |