summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/parser
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-2423-476/+476
| | | | | | | | | | | This reverts commit 4f20b58bf26d04f940db39bb5bafa5686299289a. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: Idfb0a02a064b2e61dc60604ccdb958e68f64b464 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-2723-476/+476
| | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qtxmlpatterns. Examples, tests or documentation files are not updted. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4173 Change-Id: Ib454a53153affee0d7f3d6b5ff5e7b96f911b3f4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Fix createTokenLookup.sh and re-run itEdward Welbourne2019-10-082-153/+115
| | | | | | | | | | | | | | | | This regenerates the tooken lookup code, now without the need for hand-editing after running the script. The script's copy of a license header came through shell variable expansion, which broke the $...$ markers; so just cat the relevant lines of the gperf file. As gperf wants to use size_t for the len parameters of TookenLookup's hash() and value() methods, pipe its output through a simple sed to convert size_t to the unsigned int we actually want; and fix a fall-through marker at the same time. Change-Id: Ia38c4cd833c6fcaad2371c154e2204c0992aa811 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Run createParser.sh to update the query transform parserEdward Welbourne2019-09-1713-874/+909
| | | | | | | | | | | We are curious to know whether to keep the ypp file around, so wish to review what changes when we use it. Various things with YY* names have now changed to have XPATH* names, so renamed them systematically in the non-generated code. Change-Id: Ia5fad9bc5845a8707430d59aaf6ac6dadf17b5bd Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix three warnings from bisonEdward Welbourne2019-09-161-3/+3
| | | | | | | | | We were using directives that are now deprecated. Replaved them with the modern equivalents bison suggested when run. These changes *do* change the output. Change-Id: I18064e60c86d1782490ab5896ab9233593198caf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Change a fall-through comment to Q_FALLTHROUGH()Edward Welbourne2019-09-041-1/+1
| | | | | | | | Calms gcc 7, which makes unannounced fall-through part of our standard warnings (which are handled as error in developer builds). Change-Id: Idc8cbb91d2fc5530a979b0ff06adde13f7c1b675 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix deprecation warnings about deprecated container conversionsFriedemann Kleint2019-05-221-1/+1
| | | | | | | | Fix warnings introduced by qtbase/92f984273262531f909ede17a324f546fe502b5c. Change-Id: I1f64f1573ae4cff9e39f1a340711f2e90a6a7dd1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-051-5/+1
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: Ic6c735aa46b7c80f82d741d67e72706c9c983eb6 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* qxquerytokenizer.cpp: Fix -Wimplicit-fallthroughFriedemann Kleint2017-06-201-20/+0
| | | | | | | | | | | Remove the Q_ASSERT following the return statements in the switch. Fixes numerous warnings: parser\qxquerytokenizer.cpp:825:28: warning: this statement may fall through [-Wimplicit-fallthrough=] Q_ASSERT(false); Change-Id: I921b4a61f7751f7a55c708ed182806e76e7d75e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup implicit fallthroughs in xmlpatterns5.8Allan Sandfeld Jensen2017-03-306-52/+9
| | | | | | | Use Q_FALLTHOUGH instead of comments, and use it consistently. Change-Id: Ieaf4867b612e624774011275b90cdd3678a29fe9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Mark missing implicit fallthroughsAllan Sandfeld Jensen2017-03-292-0/+5
| | | | | Change-Id: I92ab00eb63a5baac80c0ecc328141396bf7331bd Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-rc1Liang Qi2016-11-262-4/+4
|\ | | | | | | Change-Id: Ib366f5432976104caca78f57e02990e6b91c61e2
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-242-4/+4
| |\ | | | | | | | | | Change-Id: I71b83950080f0bd18f2bafbb675816a50fa06a28
| | * Fix memory leakAlbert Astals Cid2016-11-022-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-021-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: If96447854450a284f77e5ec087e76b866ef1bb06
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-1/+1
| |\ \ | | |/ | | | | | | Change-Id: I0653ca8dd6a9b6ee2314911c7679a1c056dc3709
| | * Fix -Werror=duplicated-condFrederik Gladhorn2016-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bit of error handling is actually not checking what was originally intended - doing manual pluralization of the error message. Fix it to at least compile with -Werror (gcc 6.1.1). parser/qmaintainingreader_tpl_p.h:204:26: error: duplicated ‘if’ condition [-Werror=duplicated-cond] Change-Id: Ia81ad3c8c1393d08da0a229c4625504faf56c184 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | qxquerytokenizer - remove dead codeTimur Pocheptsov2016-06-011-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify long and strange 'if(){return} else if () {return} else {return } dead_code; return' - as suggested by Coverity, CID 21875. Change-Id: I8a28b14003c6a533237163e44a549ac374344946 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | XSLTTokenizer - remove unreachable function call.Timur Pocheptsov2016-06-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity CID 22016 - the code can never be reached, since what we have is: loop() { switch { ... if (a) { ... continue; } else { ... continue; } unrechable(); break; } } Change-Id: I13a0ddab0e0f9e4629beb80fd39369b734880795 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | XSLTTokenizer::queueSorting - remove redundant &&Timur Pocheptsov2016-06-011-1/+1
|/ / | | | | | | | | | | | | | | Coverity CID 88517, we have expression equivalent to 'true && something()', something() should be enough. Change-Id: Id2bfe9b798e43491e6e8147df49262c38a94f98f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-beta1Liang Qi2016-04-081-120/+120
|\ \ | |/ | | | | Change-Id: I73a017a419830e8b594a946f969feb6ea225aeb9
| * Add some QChar::unicode() calls to brush over deprecation warning.Friedemann Kleint2016-04-061-120/+120
| | | | | | | | | | | | | | ... introduced with e0ea0f6178 in QtBase. Change-Id: I164d2696668ab2823a89b866804cd52c64dbb90d Reviewed-by: hjk <hjk@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2126-407/+581
|/ | | | | | | | | | 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>
* Remove the use of the "register" keywordThiago Macieira2015-08-061-5/+5
| | | | | | | | | It's deprecated in C++14. Found by Clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register] Change-Id: Ib306f8f647014b399b87ffff13f23d75e8255950 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Implement bison parser stack re(al)location.Erik Verbruggen2015-06-108-814/+916
| | | | | | | | | | | | | | | | | | | | The elements on the parser stack are of a complex type, which bison generated parsers don't know how to reallocate when they need to grow the stack. This patch implements yyoverflow, which is called whenever the parser runs out of stack space. The size of the elements is quite large (152 bytes on x86_64), so the initial stack (which is allocated on the C stack) is set to 1 element. Any subsequent reallocations are done by using QVector for reallocation, copying the elements, and handling the deallocation. Because of the size of the elements, the stack (vectors) are grown linearly. The upper limit of the stack size if left at 10000 elements, which should really be enough for an lalr(1) grammar. Task-number: QTBUG-4470 Change-Id: Ic1ef08655b388c38ef452d03a425cbd31b91825b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Prefixed all tokens with T_ to prevent collisions with macros.Erik Verbruggen2015-06-1010-4204/+3573
| | | | | | | | 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>
* Rename private header qdebug_p.h to qxmldebug_p.h.Friedemann Kleint2015-04-071-1/+1
| | | | | | | | | 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-1725-287/+239
| | | | | | | | | 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-281-0/+11
|\ | | | | | | Change-Id: I3d603fd0df0a445b392a758d1668bfaa9af29b53
| * Add missing private headers warningv5.3.25.3.2Samuel Gaist2014-08-181-0/+11
| | | | | | | | | | Change-Id: Iaac8c5129451d958d4e8d90ed6bbae80ed6c8755 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-2421-420/+244
|/ | | | | | | | | - 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 unused variable, found by ICC 14v5.2.1Thiago Macieira2014-01-101-2/+0
| | | | | | | | | qxslttokenizer.cpp(700): warning #177: variable "val" was declared but never referenced const QStringRef val(m_currentAttributes.value(CommonNamespaces::XML, QLatin1String("space"))); ^ Change-Id: Ic806bf1e9c22ead8680907b0e22794d7b07dcc90 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix MSVC2010 warnings.Mitch Curtis2013-12-061-7/+1
| | | | | | Change-Id: I081b4ebad362d99dcae594f877592f2a910002f3 (cherry picked from commit e7a51b138772cb453555d27f44e6a2c0e79e799c) Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Sync source and generated versions of the query parser.Thiago Macieira2013-12-063-1116/+1569
| | | | | | | | | | | | | | The following manual changes to qquerytransformparser.cpp were not reflected in the .ypp source, but they are now: c95a0e6e8eb8ba5fd2a4412b318ad998b3ccb4fc (Nov 2009) c1623a0d42c9869e5a1d04081e7660722a863de5 (Apr 2012) The following change is lost because it modified code generated by bison (not from .ypp) and needs to be re-applied: e7a51b138772cb453555d27f44e6a2c0e79e799c Change-Id: I72e76732acd1c370394c9fc373522b43ace6e009 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix MSVC2010 warnings.v5.2.0-alpha1Mitch Curtis2013-09-241-7/+1
| | | | | Change-Id: Ic586e7d306729f26859411b17c79d36320f487e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove use of 'register' from QtXmlPatterns.Stephen Kelly2013-06-161-5/+5
| | | | | Change-Id: I7d5136b9381fcce1ac7233ac743ab205d73ca0fa Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-0525-27/+27
|\ | | | | | | Change-Id: I0e2f2023d576e479246ed86c6a95eba3c8b9d93b
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1025-27/+27
| | | | | | | | | | | | Change-Id: I5b7d4c1de139bebfff1b67d216c579835431e5d6 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-287-25/+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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2425-652/+652
| | | | | | | 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-272-1/+1
| | | | | | | | | 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-161-2/+2
| | | | | | | | 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>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [other]Thiago Macieira2012-05-032-6/+6
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ib84e307f486cb3049f0b61a667caa40799394f86 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't use the QRegExp methods that modify the objectThiago Macieira2012-04-242-2/+2
| | | | | | | | | | | | | | 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>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3125-27/+27
| | | | | | | | | | | 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-2325-27/+27
| | | | | | | | 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>
* Stop treating text files as binary files in git diffs.Jason McDonald2012-01-231-4/+0
| | | | | | Change-Id: I2d4db4f0a2363113a11e064a8005a72a25991d69 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-0925-27/+27
| | | | | | 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-118-110/+110
| | | | | | | | | | | | | 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-2425-463/+463
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me