aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlcontext
Commit message (Collapse)AuthorAgeFilesLines
* Fix crashes with closures created in QML componentsLars Knoll2017-09-063-0/+47
| | | | | | | | | | | | | | | When closures created inside QML components are called after the surrounding component (and consequently QML context) has been destroyed, we are in a somewhat limited environment. Initially we would just crash as the calling QML context is not valid anymore. We can alleviate that by introducing reference counting on the context and letting the QML context wrapper keep a strong reference. This avoids the crashes and also ensures that at least imports continue to be accessible within these contexts (as the singleton test case demonstrates). Task-number: QTBUG-61781 Change-Id: I893f171842d01b0863d95a02ea738adc2620e236 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-0/+29
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| * Fix char conversions in QMLChristian Strømme2016-08-091-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 90b06e2773842, as it had unwanted side effects. The original intention was to make assignment from char to string possible, or more specifically, we wanted a solution where a QChar could be assigned to a QString, as a character and not a string representation of its value. While this behavior is desirable for QChar, we most likely want the opposite for the regular character types. Task-number: QTBUG-49232 Change-Id: I82d5f72b900fe984c4db1478fd52a9eb69ad2ee6 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-192-0/+21
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| * Revert "Remove this piece of code"Simon Hausmann2016-05-182-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bad007360a0f6fba304d8f4c99826a1250fd886c. The lookup in the global object is necessary to detect whether we've seen any unresolved properties. This is used for the optimization of skipping binding refresh updates when a context property changes. Task-number: QTBUG-53431 Change-Id: Idb39a32e4b58b915496bbb9d8a098dc17a6f688a Reviewed-by: Lars Knoll <lars.knoll@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 CONFIG += parallel_test.Friedemann Kleint2015-09-051-2/+0
| | | | | | | | | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: I699f2881e291cce02a6a608a8710638886e38daa Reviewed-by: Simon Hausmann <simon.hausmann@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-8/+8
| | | | | | | | | | | | - 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>
* 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 setContextObject to re-evaluate bindingsAlex Montgomery2014-08-151-0/+12
| | | | | | | | | Fix QQmlContext::setContextObject to reevaluate bindings as the documentation says that it should. Task-number: QTBUG-40798 Change-Id: Ifbd97c7a07a5432f4948937da863370b05705206 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QQmlError::toString: improve handling of empty urls.David Faure2014-07-241-1/+1
| | | | | | | | | | | | "file::2:23: ..." is strange to read. Show "<Unknown File>:2:23: ..." instead, by treating empty urls (including "file:") as unknown, and by still showing line and column numbers in such a case. This change makes it possible for QUrl::fromLocalFile("") to return an empty url rather than "file:", which this module was relying upon in the tests. Change-Id: I91918090fd4e0aa9a25dbbb18893a0ce94140e21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix some compiler warnings in tests and examples.Christian Kandeler2014-01-151-0/+1
| | | | | Change-Id: Ia739c995005635caf6fd0bd4e495ed8567350e83 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Make it possible to handle pointers to QObject derived in QML.Stephen Kelly2013-09-101-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, properties of QObject derived types can be read in QML code for example: Q_PROPERTY(MyObject* obj READ obj CONSTANT) Previously, only QObject* types could be read by QML: Q_PROPERTY(QObject* obj READ obj CONSTANT) This meant that multiple properties and methods had to be created for classes which were relevant to both QML and non-QML code. This patch lifts that restriction. As a consequence, we can also remove a Q_EXPECT_FAIL from the qqmllanguage unit test. That test was introduced in commit 92562eacbc3c (Allow signal parameters which are custom QML object-types, 2012-07-13) to document knowledge of the limitation while fixing it as much as possible. Task-number: QTBUG-26662 Change-Id: Ic85fa73c6f3655189438ec509765bae2eab9993a Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-261-9/+9
|\ | | | | | | | | | | merge Change-Id: I5824a3eb624b325de10acfd5109c4c1bdabcf780
| * Replace www.nokia.com by www.qt-project.org in tests.Friedemann Kleint2013-07-121-9/+9
| | | | | | | | | | | | | | Task-number: QTBUG-32390 Change-Id: I595b1bf683d1e63e44354c042f23dd9e10847862 Reviewed-by: Sergio Ahumada <sergio.ahumada@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>
* 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>
* Trim trailing whitespace.Stephen Kelly2012-08-221-27/+27
| | | | | Change-Id: I3d268d3ce8d73c7287f51abe9a28c165cb75acb9 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* 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>
* Ensure context is valid before VME method creationMatthew Vogt2012-05-014-0/+41
| | | | | | | | | | Ensure that a valid context exists prior to evaluation of a VME method function. Invalid contexts can occur if a method's first invocation is triggered after the destruction of the component's context. Task-number: QTBUG-25516 Change-Id: I349a73c5713e178f920c44f5ddcaa1dc6eec199f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Stop stuffing the URL "<Unknown File>" in QML errorsThiago Macieira2012-04-121-1/+1
| | | | | | | | | | | | QQmlError already knows how to deal with source scripts with no URL and it will use "<Unknown File>" when converting to a string. QUrl in Qt 5 leaves the "<" and ">" characters encoded, which means we ended up getting warnings about "%3CUnknown File%3E", which isn't nice. Change-Id: I504604fa37bb734549048432aaf9db3b1fa568d2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use the same ReferenceError message wording as V8Kent Hansen2012-03-141-1/+1
| | | | | | | | | | | Instead of "Can't find variable: foo", use "foo is not defined". This is in preparation of letting V8 throw the exception when a property lookup fails on the QML scope object (needed for QTBUG-24448). Change-Id: I3c747482a8ef138dad9a85530a4f6b5c4c818a03 Reviewed-by: Aaron Kennedy <aaron.kennedy@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-247-0/+702
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>