summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/expr
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup implicit fallthroughs in xmlpatterns5.8Allan Sandfeld Jensen2017-03-302-2/+1
| | | | | | | Use Q_FALLTHOUGH instead of comments, and use it consistently. Change-Id: Ieaf4867b612e624774011275b90cdd3678a29fe9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-rc1Liang Qi2016-11-264-11/+11
|\ | | | | | | Change-Id: Ib366f5432976104caca78f57e02990e6b91c61e2
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-244-11/+11
| |\ | | | | | | | | | Change-Id: I71b83950080f0bd18f2bafbb675816a50fa06a28
| | * Fix memory leakAlbert Astals Cid2016-11-024-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't have the ExpressionVariableReference/TemplateParameterReference holding a Ptr of VariableDeclaration because the VariableDeclaration holds a Ptr of them (in the references member) so they were referencing eachother and the reference count never reaches 0. Task-number: QTBUG-32745 Change-Id: I4cda6d9eccad123984f4ad35db3e56da01d4d5b1 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Eradicate Java-style loops (I): QHashIterator -> STL-styleMarc Mutz2016-09-201-15/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-0115-10/+54
|\ \ | |/ | | | | Change-Id: I0653ca8dd6a9b6ee2314911c7679a1c056dc3709
| * Add some missing initializationMarc Mutz2016-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Unbreak ubsan developer-buildMarc Mutz2016-07-1214-10/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QtPatternist::AtomicValue is a polymorphic non- exported class, so this failed at link-time. Ditto for the other cases. Fix by autotest-exporting the classes. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU. Change-Id: I5c47be779a3833433a7108a79a57d61a93ab5494 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Updated license headersAntti Kokko2016-01-21175-2450/+3500
|/ | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-083-2/+16
|\ | | | | | | Change-Id: I9a379d34bf80344de9b6e9465e6f35fca7fd1a12
| * Iterate Over the Items (Not the Operands) of a Literal SequenceDavid E. Narvaez2015-07-293-2/+16
| | | | | | | | | | | | | | | | | | | | The current code iterates over the (empty) list of operands of a Literal Sequence, ignoring any items in it, so Literal Sequences are always ignored in the ExpressionSequence. Task-number: QTBUG-35897 Change-Id: I60341ac21c8e3b77bf6d8dfeebdbafe010844406 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | OrderBy: Replace deprecated qLess by std::less.Friedemann Kleint2015-09-071-7/+17
|/ | | | | | | | | | | | | | | | | | | | | | | Fix warning: expr\qorderby.cpp:79:7: warning: 'template<class T> class qLess' is deprecated [-Wdeprecated-declarations] class qLess<Item::List> ^ In file included from qtbase\include\QtCore/qalgorithms.h:1:0, from qtbase\include\QtCore/QtAlgorithms:1, from expr\qorderby.cpp:34: qtbase/src/corelib/tools/qalgorithms.h:150:40: note: declared here class QT_DEPRECATED_X("Use std::less") qLess ^ expr\qorderby.cpp: In member function 'virtual QAbstractXmlForwardIterator<QPatternist::Item>::Ptr QPatternist::OrderBy::evaluateSequence(const Ptr&) const': expr\qorderby.cpp:172:11: warning: 'template<class T> class qLess' is deprecated [-Wdeprecated-declarations] const qLess<Item::List> sorter(m_orderSpecs, context); ^ In file included from qtbase\include\QtCore/qalgorithms.h:1:0, from qtbase\include\QtCore/QtAlgorithms:1, from expr\qorderby.cpp:34: Change-Id: Ieb626eb0de96aea670433bb46a52ed780240e8d7 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* Prefixed all tokens with T_ to prevent collisions with macros.Erik Verbruggen2015-06-101-1/+1
| | | | | | | | Identifier names like "IN" and "AS" have a high probability of being defined by certain platforms as macros, esp. with Visual Studio. Change-Id: I1fbc0ae33f94387b83377181b6012683a418459a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Skip op-numeric-unary-minus-1 testcase because it crashes.Jan Arve Saether2015-04-151-1/+4
| | | | | | | | | It seems to require a larger refactoring in order to solve this, so we skip this for now in order for us to be able to run the remaining tests in CI. Change-Id: I2ae4860a92cdb7fb88ca89c4dd1f047bacbaaf9e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Rename private header qdebug_p.h to qxmldebug_p.h.Friedemann Kleint2015-04-072-2/+2
| | | | | | | | | Avoid conflicts with the newly introduced qdebug_p.h of QtCore. Change-Id: I04b83e159900d9d36fa96ae5112eb4cdf75c0551 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-17175-1225/+1225
| | | | | | | | | 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-283-0/+33
|\ | | | | | | Change-Id: I3d603fd0df0a445b392a758d1668bfaa9af29b53
| * Add missing private headers warningv5.3.25.3.2Samuel Gaist2014-08-183-0/+33
| | | | | | | | | | Change-Id: Iaac8c5129451d958d4e8d90ed6bbae80ed6c8755 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-24175-3325/+1925
|/ | | | | | | | | - 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>
* Remove QtAlgorithms usage from QtXmlPatterns.Friedemann Kleint2013-09-273-4/+10
| | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I4e2c7bf7970ba59ca9443c545b66db9f509d946b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-05175-175/+175
|\ | | | | | | Change-Id: I0e2f2023d576e479246ed86c6a95eba3c8b9d93b
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-10175-175/+175
| | | | | | | | | | | | 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-2/+0
| | | | | | | | | | | | | | | | | | 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-2890-340/+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: remove unused variables.Erik Verbruggen2012-12-171-2/+0
|/ | | | | Change-Id: I8d42e918cab045b0541ab3aad7b9bc98e78a3cd1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix XmlListModel memory leakAri Koivisto2012-10-145-8/+8
| | | | | | | | | | | | This is a forward port of a memory leak fix committed to Qt 4.8 (QTBUG-15191). The fix includes all changes except changes to qitem_p.h which has changed in Qt 5.0. Additionally fix qxmlquery autotest failure introduced in the original Qt 4.8 patch. Task-number: QTBUG-27357 Change-Id: Ia0e916d9d6bccea014d28920cef48d6e47e8f04f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-24175-4204/+4204
| | | | | | | 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-276-3/+3
| | | | | | | | | 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>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-31175-175/+175
| | | | | | | | | | | 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-23175-175/+175
| | | | | | | | 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-09175-175/+175
| | | | | | Change-Id: Iba74aff1aba680f7b56314f3acae3478be9d3e56 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-1188-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>
* Update licenseheader text in source files for qtxmlpatterns Qt moduleJyri Tahtela2011-05-24175-2979/+2979
| | | | | | | 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-27176-0/+24538
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