aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp
Commit message (Collapse)AuthorAgeFilesLines
* JSON: Properly handle bad objects in JSON.stringify()Ulf Hermann2022-08-231-0/+40
| | | | | | | | | | | | | | | | | | | For objects with circular structures we generate a proper error message and fail earlier. For objects with excessive recursion we throw a range error rather than crashing. This behavior is modeled after node's behavior in such circumstances. We use the existing stack overflow detection to determine when to throw the range error. Testing shows that on windows the limit was insufficient. Lower it. Fixes: QTBUG-92192 Change-Id: I25dd302f65f359111e42492df3c71549c4ed7157 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit af1ef35fa00a466d3af04c17b59fcb4ea38f396a) Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Consolidate test helpers into private librariesMitch Curtis2021-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | Previously each test would include and build sources from the shared folder. Now we make those sources a library, build it once, then have each test link to it instead. We also take the opportunity to move some helpers that qtquickcontrols2 had added into the quicktestutils library where it makes sense, and for the helpers that don't make sense to be there, move them into quickcontrolstestutils. We add the libraries to src/ so that they are internal modules built as part of Qt, rather than tests. That way we can use them in a standalone test outside of qtdeclarative. Task-number: QTBUG-95621 Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e310dadef779b28845b41fb091634cd001cda9de)
* Updated license headersJani Heikkinen2016-01-201-17/+12
| | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Tests: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | | Use character literals where applicable. Change-Id: Ib0e618752fbc762a73a0a91c43efab61ef2c9687 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | 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: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix the remaining test failures in the jsonbinding autotestLars Knoll2013-06-171-1/+1
| | | | | | | | | Skip properties that are function objects when converting a V4 Object to a QJsonObject. For arrays the function object gets replaced with null. Fix the test case for arrays to have the correct expected output. Change-Id: I3ee63935d038e0922e33ac6e64e9c31ecfbd4a7e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix most qjsonbinding auto testsLars Knoll2013-06-171-3/+3
| | | | | Change-Id: I67476bc7e931e2f4790e859d4a3c00c050752271 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Revert "Allow function assignment to cause binding for non-var props"Chris Adams2012-05-151-3/+0
| | | | | | | | | | | | | This reverts commit 92b1f9981d225ecee28da1f0a88fb3046000cb5e. Conflicts: src/qml/qml/v8/qv8qobjectwrapper.cpp Also remove XPASS tests from qjsonbinding Change-Id: Ibc9da28d5f0bdffbf62e7e20f12bb55ff36ae271 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add QJson support to QV8EngineKent Hansen2012-04-161-0/+535
Make QV8Engine perform direct conversion between JavaScript values and QJson{Value,Object,Array}. This implementation always makes a deep clone of the QJson{Object,Array} when converting to JS; it might make sense to add a lazy conversion scheme for dealing with large objects. Change-Id: Id0b65891a19515ce22f1e51fa8a28d9f3e595271 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>