summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/schema
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-01-292-40/+38
|\ | | | | | | Change-Id: I09553d29eab1e65fc3e51d72ff6ea6682794d312
| * Improve documentation for w3c's xml.xsd fileKai Koehne2018-01-262-40/+38
| | | | | | | | | | | | | | | | | | | | | | | | Use the qt_attribution.json setup, instead of hardcoding the license in the documentation. Also update the license to the latest W3C one, that supersedes the old license even for exising documents. [Third-Party Code] Update license of w3c'c xml.xsd file. Change-Id: I59a8a6f9d97ad89e530eb4cd30b1f4e1a725fcf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Significantly improve memory usage in XsdStateMachine::toDFAViktor Engelmann2018-01-041-9/+7
|/ | | | | | | | | | | | | We now mark DFA state sets immediately when they are enqueued and check for that mark before enqueing them. This way, we save a lot of memory when a set has many states and is encountered often. In the referenced bug report, there were 60000 copies of a set with 40000 entries, wasting tens of gigabytes of memory. Task-number: QTBUG-65067 Change-Id: Iec3a04c8badfac29faefbba22c2942ed104effbb Reviewed-by: Kari Hormi <kari.hormi@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix compilation error with ICC 17: it doesn't like auto and commaThiago Macieira2017-06-201-4/+12
| | | | | | | | | | | The error is a warning upgraded via -Werror and the message doesn't even make sense to me: error #3373: nonstandard use of "auto" to both deduce the type from an initializer and to announce a trailing return type Intel-Issue-ID: 6000164202 Change-Id: I73fa1e59a4844c43a109fffd148caf09a1952e92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix previous fix for trailing 0 handlingKarim Pinter2017-02-081-7/+7
| | | | | | | | | | | The previous fix, 82c5cc6532ac5d0323ecda94b6767e1fdaef2639, wasn't handling properly double conversion to string, this change is rather going through the characters instead. It also adds new test cases. Task-number: QTBUG-58245 Change-Id: I1563d541b0c9fef1254b5fb728308fb2517ed3aa Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* fractionDigits doesn't count the trailing 0s anymoreKarim Pinter2017-01-201-6/+7
| | | | | | | | | fractionDigits were counting also the trailing 0s, which is against the standard https://www.w3.org/TR/xmlschema-2/#rf-fractionDigits Task-number: QTBUG-58245 Change-Id: I9175d4870de82e25c4df2317394ccfba8048fb48 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Eradicate Java-style loops (I): QHashIterator -> STL-styleMarc Mutz2016-09-207-88/+34
| | | | | | | | | | | | | Java-style iterators are slower than STL-style ones, so they should not be used in library code. Replaced them with STL iterator loops. In one case, a QMutableHashIterator actually needn't be mutable, so ported to const_iterator, like all others. Change-Id: Ib7fd1fa5fca2df2c288a61925ee68a5df11caf62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Eradicate Java-style loops (II): QSetIterator -> C++11 ranged forMarc Mutz2016-09-204-34/+12
| | | | | | | | | | | Java-style iterators are slower than STL-style ones, so they should not be used in library code. Replaced them with C++11 ranged for loops, adding qAsConst() as needed. Change-Id: I21b59daceafc62b94ebba56bfef1f050988b9c9f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QXsdValidatingInstanceReader: remove unused typedefMarc Mutz2016-09-201-1/+0
| | | | | Change-Id: I4fd97dcbc433aab9f2929c3336d7e26decbf634b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Diagonalize XsdValidatingInstanceReader::validateUniqueIdentityConstraint()Marc Mutz2016-09-201-11/+3
| | | | | | | | | TargetNode::fieldsAreEqual() is symmetric, so diagonalize the nested loops to avoid both checking for identity as well as re-checking (A, B) if we already checked (B, A). Change-Id: I67668415b1f509e6119ea61b76213700e8b49b56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Regenerate qxsdschematoken.cppFriedemann Kleint2016-09-201-114/+114
| | | | | | | | | | | | | | | | | | | | | | | Fix warnings In file included from .../qtbase/include/QtCore/qchar.h:1:0, from .../qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48, from .../qtbase/include/QtCore/qstring.h:1, from .../qtbase/include/QtCore/QString:1, from schema/qxsdschematoken_p.h:56, from schema/qxsdschematoken.cpp:42: .../qtbase/include/QtCore/../../src/corelib/tools/qchar.h:586:1: note: declared here schema/qxsdschematoken.cpp:1733:37: warning: 'constexpr typename std::enable_if<std::is_same<typename std::remove_cv< <template-parameter-1-1> >::type, int>::value, bool>::type operator==(QChar, T) [with T = int; typename std::enable_if<std::is_same<typename std::remove_cv< <template-parameter-1-1> >::type, int>::value, bool>::type = bool]' is deprecated: don't compare ints to QChars, compare them to QChar::unicode() instead [-Wdeprecated-declarations] In file included from .../qtbase/include/QtCore/qchar.h:1:0, from .../qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48, from .../qtbase/include/QtCore/qstring.h:1, from .../qtbase/include/QtCore/QString:1, from schema/qxsdschematoken_p.h:56, from schema/qxsdschematoken.cpp:42: .../qtbase/include/QtCore/../../src/corelib/tools/qchar.h:586:1: note: declared here Change-Id: I1117cffac6e5b4d51a3f53818ac9c4e366b9d4ba Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-012-3/+6
|\ | | | | | | Change-Id: I0653ca8dd6a9b6ee2314911c7679a1c056dc3709
| * Add some missing initializationMarc Mutz2016-07-192-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by UBSan: xmlpatterns/expr/qorderby_p.h:78:15: runtime error: load of value 11181584, which is not a valid value for type 'Direction' xmlpatterns/expr/qorderby_p.h:78:15: runtime error: load of value 32766, which is not a valid value for type 'OrderingEmptySequence' xmlpatterns/schema/qxsdstatemachine_p.h:66:11: runtime error: load of value 2979516404, which is not a valid value for type 'NodeName' xmlpatterns/schema/qxsdschemaparser.cpp:340:67: runtime error: load of value 40, which is not a valid value for type 'bool' The init values are chosen to match what zero-initialization would have chosen. Change-Id: Iaf69720476cfe6c117dc2c91f39801a0be8bde54 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-1/+1
|\ \ | |/ | | | | Change-Id: I0b372947924113abfb00d77a655d71c43324ef99
| * XsdElement: Initialize member m_isNillableEdward Welbourne2016-05-311-1/+1
| | | | | | | | | | | | | | As pointed out by Coverity (CID 22378). Change-Id: Ibeb06c49b8ead1925bc0377bcaef6109f7f8e53c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2194-1316/+1880
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I34265811e603ad9c5a7adcaab7791a521ae0ffb8 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Use QSet::intersects() instead of QSet::intersect()Sergio Martins2015-05-302-2/+2
| | | | | | | It's much faster Change-Id: I959559a442ab6acf424d7798b9bcd01ab29e65e3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Replace containsSet() with QSet::contains()Sergio Martins2015-05-261-15/+2
| | | | | | | | We have a QSet::contains() since 4.6. Change-Id: Idbafeec6e58aadff4a07e7ed50ac54dc8738623a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-1794-673/+665
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1dc468d4e08c2dfdc4643410220f18bc8ec450b9 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4v5.4.0-alpha1Frederik Gladhorn2014-08-282-0/+22
|\ | | | | | | Change-Id: I3d603fd0df0a445b392a758d1668bfaa9af29b53
| * Add missing private headers warningv5.3.25.3.2Samuel Gaist2014-08-182-0/+22
| | | | | | | | | | Change-Id: Iaac8c5129451d958d4e8d90ed6bbae80ed6c8755 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2493-1767/+1023
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: If9208b9c90bcea35bbfe6b9c10db7803e97767e0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix typov5.3.0-rc1v5.3.0release5.3.0Sergio Ahumada2014-04-011-1/+1
| | | | | Change-Id: I4754f1bc1f9fb3e099fc7c7135ca0a933d9b7475 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix undefined behavior validating XSD substitution groupsMark Shroyer2013-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | A bug in XSD substitution group validation would result in an invalid cast of SchemaType::Ptr to XsdComplexType::Ptr, in which case evaluating complexType->prohibitedSubstitutions() exhibited undefined behavior. In practice this caused validation against XSD schemas containing substitution groups to fail on some machines, where ORing the checkSet mask against out of bounds memory could cause the function XsdSchemaHelper::substitutionGroupOkTransitive() to return a false negative. Minus the bug fix, the regression test added in this commit failed on (at least) Linux ARM when compiled with the Linaro toolchain 2013.01 g++ 4.7, with flags -marm -mcpu=cortex-a8 -O2. However, it did not fail on a Linux amd64 machine prior to the bug fix. Change-Id: Idd060a941a3bc0620f1fcc903375e43022bdcbdc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtXmlPatterns: Fix (!a == b) bugTobias Hunger2013-08-292-2/+2
| | | | | | | | | | The ! applies to a only, so the result of this expression is most likely not what was expected. Clang warned about this one. Change-Id: I600c1ec70fa22313eee70ecce8995afd83713de6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-0594-94/+94
|\ | | | | | | Change-Id: I0e2f2023d576e479246ed86c6a95eba3c8b9d93b
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1094-94/+94
| | | | | | | | | | | | Change-Id: I5b7d4c1de139bebfff1b67d216c579835431e5d6 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Fix warnings found in qtxmlpatterns by ClangThiago Macieira2013-01-021-0/+2
| | | | | | | | | | | | | | | | | | schema/qxsdstatemachine_tpl_p.h:186:71: error: unused parameter 'input' [-Werror,-Wunused-parameter] expr/qexpression.cpp:139:50: error: unused variable 'end' [-Werror,-Wunused-variable] projection/qdocumentprojector_p.h:84:22: error: 'QPatternist::DocumentProjector::attribute' hides overloaded virtual function [-Werror,-Woverloaded-virtual] Change-Id: I84021e4aa6bdca8dfcaa4c375845ceb24c33818b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2844-176/+0
| | | | | | | | | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: I74e76ed86361fbbf8957bf7a0540f2bd3350eb0a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Fix compiler warning about unused parameters.Erik Verbruggen2012-12-171-0/+3
|/ | | | | Change-Id: Ib9f6f371698f50397ad3a646703657d0e016dfe1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2494-2259/+2259
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I34508f293d75832657f79479e2a8c184e873e154 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* change naming convention for template source filesOswald Buddenhagen2012-06-274-2/+2
| | | | | | | | | rename *.cpp => *_tpl_p.h otherwise, syncqt doesn't generate code to install them, which makes the "regular" private headers which include the template code useless. Change-Id: I7f3a34bf442fb003bcb7ef96dd4f88d47bd6598b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed -qtnamespace compilation issues.Rohan McGovern2012-05-162-5/+5
| | | | | | | | Forward declaration of classes should come after QT_BEGIN_NAMESPACE, if the declared classes are expected to be inside the qtnamespace. Change-Id: Ifa7f2cbcd5ea9f5a0b2ade267c76d9e5e04d105a Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Don't use the QRegExp methods that modify the objectThiago Macieira2012-04-243-13/+13
| | | | | | | | | | | | | | QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: I2c4d5f4b60d6b3569568103cd7107cd2adaa3ae8 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make method non-inline as Symbian support is gone.Holger Hans Peter Freyther2012-01-312-7/+7
| | | | | | | | | | The comment mentions that this method is inlined to work around a compiler bug. We do not support this compiler anymore, move the definition back to the .cpp file. Change-Id: I0052b0616bdd997fd35b3b544563c07f865e66c5 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3194-94/+94
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie14feff161cca83c53750e22a6204d34c3cba52c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-2394-94/+94
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I4a78fc4951be48d46135f4a5e0072bd1a8061ea9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-1091-91/+91
| | | | | | | | The previous commit missed some outdated license headers from 2008. Change-Id: I82c1a0aa4c133195094b00c26e8579e03b85c798 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-093-3/+3
| | | | | | Change-Id: Iba74aff1aba680f7b56314f3acae3478be9d3e56 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compile warnings about assigned/unused variables.Friedemann Kleint2011-11-302-3/+1
| | | | | | Change-Id: I75cbbea2777f2359fa4d86fd28057dd16bc02feb Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make private headers usable, and use them in the tests.Rohan McGovern2011-11-1144-162/+162
| | | | | | | | | | | | | The xmlpatterns private headers were not including each other correctly, making them unusable unless the source directory was available and in INCLUDEPATH. Fix it so that the private headers include each other by <private/...>, allowing them to work for an installed Qt. Change-Id: I9c7cbad219ed141c356d9ea097e67e0fb2fa550c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use QBasicAtomicInt load() instead of implicit castingBradley T. Hughes2011-10-101-1/+1
| | | | | | | | | The implicit casts will be unavailable in the near future. Change-Id: Ifcaf24a94caf20f6f50adaeaef05783b007b57d3 Reviewed-on: http://codereview.qt-project.org/6353 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed compile.Rohan McGovern2011-08-121-1/+1
| | | | | | | | | QtXml/QXmlStreamReader -> QtCore/QXmlStreamReader Change-Id: I81a03637e75f92d4b2946e65f0967c349bdb99ea Reviewed-on: http://codereview.qt.nokia.com/2897 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Update licenseheader text in source files for qtxmlpatterns Qt moduleJyri Tahtela2011-05-2494-1601/+1601
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-27156-0/+34864
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12