aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlqt
Commit message (Collapse)AuthorAgeFilesLines
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-37/+37
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace remaining Q_NULLPTR with nullptrKevin Funk2017-11-171-1/+1
| | | | | Change-Id: I28a32af7f1c306a3002d47025a842475f848c1a4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4 Date.ParseString(): fix UTC-ness of date-only formatsEdward Welbourne2017-11-141-1/+2
| | | | | | | | | | | | | | | | | | ECMA-262 stipulates that date-only formats should be treated as UTC, while date-times are handled as standard time, if no time zone is explicitly given. Tidied up the parser a bit in the process and documented what the spec says. Fixed some broken test-cases. Handling of date-times without zone as local time is a correction since edition 5.1 of ECMA-262 (which said to handle it as UTC): http://www.ecma-international.org/ecma-262/7.0/index.html#sec-corrections-and-clarifications-in-ecmascript-2015-with-possible-compatibility-impact We were previously handling both dates and date-times as local time, violating the old spec for both and the revised spec for dates. Task-number: QTBUG-56787 Change-Id: I557789d855b910ca6a859fca396af1a0205c9417 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4: Handle QTime->DateObject conversion betterErik Verbruggen2016-08-102-2/+118
| | | | | | | | | | | | | | | | | | | | | | By specification, date conversion functions for dates before the epoch are not DST corrected. We converted QTime to a QDateTime where we set the date part to Jan. 1, 1970, and then convert that to msecs since the epoch UTC. For places on Earth where they had DST on that day (e.g. Hobart in Australia), strange things happen: conversion from a QTime to DateObject will use DST (because it's after the epoch in local time), but conversions from DateObject to QTime won't use the DST because it's before the epoch (in UTC). Now as everyone knows, a 24-hour clock time has no meaning without a date, only "elapsed time" has. But users still expect to be able to pass QTime to QML/JS. So, we do the conversion on day 0 of month 0 of year 0, and all of it in local time. This gives a stable conversion in both directions, and the values in both C++ and QML/JS are the same for any timezone (with or without DST) on this planet. Task-number: QTBUG-54378 Change-Id: I892e16a93f015e92d311c6cae3ae7768b7373f6a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Qt object: Add exit(int)Cavit Sina Dogru2016-08-092-0/+22
| | | | | | | | | | | | This is similar to the Qt.quit() function but also specifies the return code that the event loop will return. [ChangeLog][QtQml] Added exit(int retCode) method to the Qt global object. An application can call Qt.exit to specify a return code of the engine. Task-number: QTBUG-54360 Change-Id: Iaa319e6dc4d6b99dc3a5c01845e87b936fd2cab0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devSimon Hausmann2016-05-182-0/+56
|\ | | | | | | | | | | | | | | Conflicts: src/qml/qml/v8/qqmlbuiltinfunctions_p.h tests/auto/qml/qqmlqt/tst_qqmlqt.cpp Change-Id: I9dd93732f4b19513576ca1dd89ae18c69de0203b
| * QML: Fill QtObject lazily.Erik Verbruggen2016-05-112-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only iterate over the enumerations/enumerators in the staticQtMetaObject when a get() is done, and the key/value is not yet in stored in the underlying Object. The whole cost of the iteration is now moved to get() and advanceIterator(). The latter will add all items in one swoop, but iteration over QtObject isn't used much (if at all). The get() will add all key/value pairs up until it finds the requested key. Checking a number of applications shows that none of them use all (or the "last") key, so it will actually save entries (which equals memory) too. This change reduces the instruction count for QtObject from 2.7M instructions down to 95k. As this initialization is done from the QQmlEngine constructor, it also speeds up that initialization. Task-number: QTBUG-43770 Change-Id: I71331ff76bdacdd4790f7ff0430c4cbc214fe0ab Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add Qt.callLater() function.Michael Brasser2016-03-086-0/+336
|/ | | | | | | | | | | | | Calling the new Qt.callLater() multiple times in quick succession with the same JS function as argument will result in a single call to that function, thus eliminating redundant unnecessary calls. Based on previous patches by Mathias Malmqvist <mathias.malmqvist@nokia.com> and Chris Adams <chris.adams@jollamobile.com> Change-Id: Ie71b60d4d48fa73d3deae723775cf36662d199ae Task-number: QTBUG-22400 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* 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>
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-031-1/+0
| | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* tests/qml: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-291-1/+1
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I8cc97fd9b48fc789a849e9527c292c4e05accd97 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Qt.hsva() functionSean Harmer2015-02-182-0/+34
| | | | | | | | | | | | This is more convenient than the alternative hsla() function in many cases as color pickers in other applications default to the HSV color space e.g. GIMP, kcolorchooser. [ChangeLog][QtQml] Added Qt.hsva() function Change-Id: Id5c1a78173757bf9842b164d90b31682e9a41749 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.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>
* Add a column to the default method error messageSimon Hausmann2014-03-021-1/+1
| | | | | | | | This brings both compilers in sync by reporting line and column if doing a signal object assignment without a default method. Change-Id: I8b1bf90c4ce3cd7b117ad7eecdbfe319b07b1191 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
| | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@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>
* Fix compiler warnings in declarative tests.Friedemann Kleint2012-12-201-8/+8
| | | | | | | | | | | | - Unused variables - Missing enumeration values in switch - truncation from double to float - truncation from size_t to int - Missing initializers - Mix of operator & and bool | Change-Id: Ib212aeea41befef193f12300a1d9814a60f183af Reviewed-by: Gunnar Sletta <gunnar.sletta@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>
* doc: fix some typos in .qml filesSergio Ahumada2012-09-072-2/+2
| | | | | Change-Id: Ice5d60b06ec9ab81fbd98fd1679c8834f3018938 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Allow color to be explicitly compared to a stringMatthew Vogt2012-07-112-0/+165
| | | | | | | | | | Add the Qt.colorEqual() function which compares any combination of two supplied color and string arguments, by converting the string arguments to colors as necessary. Task-number: QTBUG-18754 Change-Id: I75baef9a2edd30a5f8b9cb5e151e4adba6f6a371 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix broken value-type support by allowing property definitionChris Adams2012-07-115-5/+128
| | | | | | | | | | | | | | | | | | | | | In QtQuick 1.x the "variant" property type was supported, which could be used to allow value type properties to be defined in QML. In QtQuick 2.0, we have deprecated the "variant" property, but its replacement ("var") is not suited for defining lightweight C++ type values (such as QColor, QFont, QRectF, QVector3D etc). This commit allows those QML basic types to be used in QML once more, by supporting them in the property definition syntax. Note that since some value types are provided by QtQuick and others are provided by QtQml, if a client imports only QtQml they can define but not use properties of certain types (eg, font). Task-number: QTBUG-21034 Task-number: QTBUG-18217 Change-Id: Ia951a8522f223408d27293bb96c276281a710277 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Add gui-private to testsGirish Ramakrishnan2012-06-221-1/+1
| | | | | | | QWindowSystemInterface will be marked as QPA API. Change-Id: Id174a24f8432219adf1425efe1eb59cf67d48bb9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Removed CONFIG+=parallel_test from suspected parallel-unsafe test [2]Rohan McGovern2012-05-231-2/+0
| | | | | | | | | This test has failed a parallel stress test and may contribute to instability in test runs. Change-Id: I7db5313078f3b3b9a7ae59facd5dbcb03777e7b8 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-112-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlprofilerservice_p.h src/qml/qml/qqmlboundsignal.cpp src/qml/qml/v4/qv4bindings.cpp src/quick/items/qquickshadereffect.cpp src/quick/particles/qquickcustomparticle.cpp src/quick/qtquick2.cpp Change-Id: Ia9c6517035ae912fa75e77473a452bd3383def56
| * Simplify date conversion functionsMatthew Vogt2012-04-112-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use the 3rd-party code from JSC, but instead use the QDateTime functions for millisecond offsets from the epoch. Note that this change is reviving the earlier change: http://codereview.qt-project.org/1874. The test failures for that change no longer occur due to a change in the QDateTime behavior applied by: http://codereview.qt-project.org/13169 There is still a semantic difference between QDateTime and the ECMAScript specification with regards to the application of DST. ECMAScript requires that the current DST adjustment should be applied to historical dates, whereas QDateTime will apply the adjustment as applicable at the epoch date to any prior dates. Change-Id: Ibebd47c9d2b75a034342ffcda075501a6a527b8d Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* | Migrate gui dependencies from QtQml to QtQuick.Matthew Vogt2012-03-202-1/+3
|/ | | | | | | | | | | | | Ensure that users of declarative that have no need for functionality provided by the Qt Gui module do not have to link against it. Any use of QtGui functionality is delegated to providers that can be installed by another library; QtQuick adds default providers for this functionality when linked against QtQml. Task-number: QTBUG-24559 Change-Id: I5e6a58a4198732dc2f8f52f71abfa1152b871aa7 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow threaded compilation in an async LoaderMartin Jones2012-03-156-0/+1268
| | | | | | | Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Changed qml tests to work from install directoryKurt Korbatits2012-03-071-3/+1
| | | | | | | | | | - Changed tests to use TESTDATA - moved qqmlcontext to private test as it contains private header - added check for cross_compile option to skip when sources not available Change-Id: I0f68f58ffcb1b41b8e40a9851e3e003fe72ee2f9 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2430-0/+1074
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>