aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Behavior: intercept bindingsFabian Kosmale2021-05-254-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new API in QQmlPropertyValueInterceptor and QQmlInterceptorMetaObject to acutally intercept bindable properties in Behavior. This works as follows: We intercept the bindable metacall, and construct an untyped proxy property. The proxy property has storage for the property data (currently via constructing a QVariant for it). It also has its own binding data. We install an observer on the proxy binding data which notifies us whenever the proxy changes. That observer is actually the QQuickBehaviorPrivate (which now inherits QPropertyObserver). Whenever the observer triggers, we read the current value of the proxy property and call QQuickBehavior::write with it. That's how Behavior can now track updates. As binding updates end up calling the write method of the Behavior, we get support for toggling enabled for free. The final part of the puzzle is how to get the property system to use the proxy property instead of the real property. This is done when we intercept the Bindable metacall: Instead of returning the source's QUntypedBindable, we construct a custom one. Its functions do the following: - setting/getting values and bindings do not affect the source, but instead operate on the proxy - observers are still installed on the source; that way, they see all writes done by the interceptor, instead of only the direct writes to the source property - makeBinding forwards to the source - We make use of the metatype multiplexing hack in the getter Task-number: QTBUG-90999 Change-Id: Ib91a12b05975f1257026ba4d2b64ec14852d4a14 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* mingw: Skip segfaulting testsOliver Wolff2021-05-251-0/+15
| | | | | | | | | | | | | | QQuickDesignerSupportProperties::registerCustomData segfaults on mingw. Due to these segfaulting tests, mingw is marked insignificant at the moment. In order to get at least some test coverage for this configuration, the tests are skipped for now. Task-number: QTBUG-90869 Pick-to: 6.1 Pick-to: 6.0 Change-Id: I75c61b83c53e038be4dc518bf39955f477d381ee Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qquickaccessible: Avoid accessing deleted objectsFabian Kosmale2021-05-211-2/+6
| | | | | Change-Id: I851baae8e3dbcb64ad0c34c4c2fa00d89cb77dee Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use build time shader compilation in lancelot testsEirik Aavitsland2021-05-2190-475/+246
| | | | | | | | | Clean up the remains of Qt 5 shaders, and use the simpler Qt 6 way of adding shaders to the app. Pick-to: 6.1 Change-Id: Ibbdf7ada899507705a2709913410b24d476d25d3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use fixed qt_add_resource BASE argumentJoerg Bornemann2021-05-218-331/+85
| | | | | | | | Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: If6e1033642d98ccd40daeb57a453c0e5bc2985da Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Don't let PointerHandler steal mouse grab from keepMouseGrab layerShawn Rutledge2021-05-202-0/+88
| | | | | | | | | | | | | | | As explained in the comment, the handler can override the keepMouseGrab "veto" if the item is a parent (like a Flickable) that filters events, but not in other cases. The logic was wrong though, apparently. Amends 090f404cf80da35734f712b02cc1543acecd5b62 Pick-to: 5.15 6.1 Fixes: QTBUG-78258 Task-number: QTBUG-79163 Change-Id: I9a473ab3b23743f863cb0be13767fdbc29cd5e1c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Reduce velocity in manual test MomentumAnimationShawn Rutledge2021-05-202-3/+3
| | | | | | | | | | | | In Qt 5 the numbers were smaller, as if units were pixels per millisecond. In Qt 6 it hopefully really is in logical pixels per second; so the animation destination should be divided by 1000 relative to what it was before. Likewise the velocity arrow in flingAnimation.qml should be 1000x shorter. This looks and feels about right currently. Fixes: QTBUG-93886 Change-Id: I7b8039024bff11f1a65a2f02ac5e2d85654cbdd0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fuzzing: Provide CMake files for fuzz targetsRobert Löhning2021-05-202-21/+57
| | | | | Change-Id: I1121331b3f8c4ed015979f164e12e81183822e2f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove tst_pixelMitch Curtis2021-05-193-78/+0
| | | | | | | | | | | | Future patches will add uses of pixel() and other accessors to selftests/tst_grabImage.qml, and that's where those kinds of tests should be. Task-number: QTBUG-27671 Pick-to: 6.1 5.15 Change-Id: I3ad42ded144cb7fa8b196a3ac58abcd9ee9b2abf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexander Akulich <akulichalexander@gmail.com>
* Add a ParentProperty classinfo and use that to find parentsUlf Hermann2021-05-192-0/+21
| | | | | | | | | | This is more robust than just going by the "parent" name. Task-number: QTBUG-93662 Change-Id: If099733de6ad0f3bb7cb75b8915789f66b554f85 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Fix inline components getting overwritten by componentsMaximilian Goldstein2021-05-192-0/+12
| | | | | | | | Previously there was a bug where components contained within inline components overwrote them instead of getting nested. This change fixes this bug. Change-Id: Iabed59da6b8609b48b38b6f06b063baf23f39d27 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Remove unneeded *.pro and .prev_CMakeLists.txt filesCraig Scott2021-05-1954-1842/+0
| | | | | | | | | | The .pro files corresponding to the .prev_CMakeLists.txt files have already been removed. Change-Id: I254eafe4c7de1a516e33bd9cb3d9879e73fa83b4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Report what failed in a QML test's JavaScriptEdward Welbourne2021-05-181-28/+114
| | | | | | | | | I needed it while debugging QDate <-> Date conversions, so we might as well keep the more informative form of it to make life easier for anyone else doing similar. Change-Id: I99057535f2f3b2783997102cc7db98290e40c220 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Actually test day of the week in test-case for day-of-week bugEdward Welbourne2021-05-182-6/+8
| | | | | | | | | | | | | The test-cases I added for QTBUG-78996 tested the root cause of the bug, but neglected to test the symptom actually reported - the day of the week was wrong. Add actual an day-of-week check to each (and semicolons on the ends of statements). This amends commit 290dc2da70655db9d4590600dfd37b825b81c1f8. Task-number: QTBUG-78996 Change-Id: Ic7064ddd5a8e4fa0806a10d73cd5955c7be4a4bc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make QDate handling consistent in its use of UTCEdward Welbourne2021-05-1823-234/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the quirk of ECMAScript's Date.parse() spec [0] stipulating the use of UTC for date-only strings, in contrast to most other ways of creating a Date using local time, reasonable users get surprised by the behavior of QDate properties initialized from strings. This can't be avoided without breaking other uses of Date, so document the work-around needed to cope with it (use UTC-specific methods to access the Date object). [0] https://tc39.es/ecma262/#sec-date.parse Make conversions back to QDate from Date work round the possibility that the Date, seen as a QDateTime(,, LocalTime), needs to be handled as UTC when extracting the date, and catch two more places that conversion from QDate neglected to use UTC's start of day, for consistency. Revised tests to call UTC-specific methods instead of the local-time ones, where appropriate. Drive-by: some tests were (entirely bogusly) constructing a fresh Date using the UTC-fields of the Date they had, in order to then test the non-UTC fields of this fresh Date; instead, simply test that the UTC fields are as expected. [ChangeLog][QML][Behavior change] Where a QDate is represented in QML's JavaScript as a Date, it is now more consistently associated with the start of the UTC day it describes. Previously cases where it was represented as the start of local time's day could lead to a Date turning into a QDate for the preceding day. Inconsistencies in the specified behavior of Date preclude eliminating such problems entirely, but they should now be limited to cases where (perversely for a date property or parameter) the date is specified with a local time late enough to make it coincide with the start of the next UTC day (in which case that next day's QDate will be its C++ representation). Fixes: QTBUG-92466 Change-Id: I2306dd9ecef0d5c2d59b562762392e51bb6d66ca Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Add inline component supportMaximilian Goldstein2021-05-143-0/+25
| | | | | | | | | | | Adds support for inline components for qmllint with a few things not working yet: - Two inline components referencing each other - Using inline components before they are declared These two issues require a larger overhaul of qmllint as a whole and will be addressed in a different change. Change-Id: I2834702c21a8eb728db4709d6f475c33796b3e4d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Blacklist tst_QQuickGridView::snapOneRow for Win 10 MinGW developer buildHeikki Halmet2021-05-141-0/+1
| | | | | | | | Pick-to: 6.1 Pick-to: 6.0 Task-number: QTBUG-88644 Change-Id: I0fdaa7d8d527dcb4c22c54e7d1004ee02c5e241c Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* qmllint: Utilize qjsroot.qmltypesMaximilian Goldstein2021-05-142-0/+21
| | | | | | | | Previously for some types like QString, QDateTime and QRegularExpression and others there was no sensible type information available. Now that we have qjsroot.qmltypes we can refer to its type information in order to resolve these types. Change-Id: Iea88cf467c694299396630e0f180ca6ff4ca3847 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Pass "final" attribute of properties through qmltypesUlf Hermann2021-05-122-3/+18
| | | | | | | | We want to know about that in QQmlJSScope. Task-number: QTBUG-93662 Change-Id: Ie4b15fa06cb921d48074ae39d1057ead439ebc45 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlProperty: Implement DontRemoveBinding support for QPropertyFabian Kosmale2021-05-121-0/+27
| | | | | | | | | | | | | | | | | The animation system currently relies on being able to write to properties through the meatobject system without breaking their bindings. This patch ensures that the DontRemoveBinding flag is honoured for QProperty based bindings, too. It is implemented by setting the private stick flag on the binding before doing the write and then removing it again after the write is done. This roundabout approach is necessary as the BindableInterface does not expose the setValueBypassingBindings functionality, and simply writing to the propertyDataPtr would prove disastrous in the case of QObjectCompatProperty. Fixes: QTBUG-91689 Change-Id: Ife1afb9c94190f1c4e9658a7193aba6dbdaa281f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlAnyBinding: Honor interceptors if and only if requestedFabian Kosmale2021-05-121-0/+15
| | | | | | | | | | | | | When installing a binding on a property which is intercepted, we can either ignore or honor the interceptor (depending on whether the newly added binding's value should be intercepted or not). This was previously only implemented for QmlAbstractBinding based bindings. This patch adds support for QProperty based bindings, and a corresponding test. Change-Id: Ib0a63426aa4a137cb7a375405843f2b0a97845d0 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qquickaccessible: Use QML_EXTENDED_NAMESPACE instead of Q_ENUMSMaximilian Goldstein2021-05-121-6/+1
| | | | | | | | | This will not change the amount of enums included (Q_ENUMS automatically pulls in all the other enums too, surprisingly). But it will enable us to see the enum values in qmltypes and thus it will work with our tooling now. Task-number: QTBUG-93588 Change-Id: Ie019689daa7f3c456d0e4c4944877c2da5031262 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmlirbuilder: Fix deep inline component script bindingsMaximilian Goldstein2021-05-122-0/+24
| | | | | | | | | Previously when having an inline component inside any component that was not the root component, we hit an assert when using a script bindings. This was due to us not generating script bindings for any more deeply nested components. Now they work regardless of component depth. Change-Id: I700cf918f955aa99076006d53fb20358ff06e75f Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Map window coordinates to the same coordinate system as the QPointerEvent pointAlexey Edelev2021-05-112-3/+91
| | | | | | | | | | | If the window has parent windows its geometry should be mapped to the global coordinates before check if it contains the point coordinates. Fixes: QTBUG-91716 Pick-to: 5.15 6.1 Change-Id: I300547361dbe895b67caeee0d47f416426444552 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Make tst_qqmlecmascript::dateParse() more thoroughEdward Welbourne2021-05-112-0/+67
| | | | | | | | | | | | Expand the test to pass a local-time QDateTime in (to check it arrives in the form expected) and, parallel to the UTC time test, that the various ways of constructing a local-time Date in JS do actually produce the expected results. Change-Id: I5ee8b4d3c0c15a5aa1168c7fb20646f3b55a7488 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make a UTC time test more thorough and coherentEdward Welbourne2021-05-112-28/+61
| | | | | | | | | | | | | | | | | | It was previously mixing in testing of QString -> JS String and JS's Number() and its string's split(), none of which was relevant, illuminating or simplifying. It also had a MyDateClass instance in the test that wasn't used, and only failed or passed, without giving any clue to what went wrong. Add console.log()s to report each error, pass a UTC QDateTime as parameter instead of a QString, use the known values for the date and time fields instead of extracting them from a string, and verify that the passed QDateTime has all expected UTC properties. Test all ways of constructing a UTC time, rather than only one of them. Change-Id: I3f5828fc994e38d567e06edf96071188154de8bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up tst_qqmlecmascript: don't leak on failureEdward Welbourne2021-05-111-1147/+933
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of tests were following the antipattern of deleting a pointer after the last QVERIFY() or QCOMPARE(), which leads to the pointer being leaked on failure. Use QScopedPointer consistently (it was already in use patchily). That changed one mis-use of QPointer (that was only checked for non-null immediately on creation, never referenced later, so being cleared on deletion wasn't relevant; and thus needed an overt delete, that QScopedPointer made redundant); but another appears to be deliberate, so documented that as such (to the best of my understanding, gc is meant to pick it up). This mostly arose with component.create() results, most of which were checked, albeit in inconsistent ways. Always check these before dereferencing, and use the same form for the check in all cases: use QScopedPointer's in-built cast-to-bool rather than !isNull(); and report the component.errorString(), using QVERIFY2(), on failure. In many cases the return from component.create() is passed through a qobject_cast<> before use; in principle, this could result in null even though create() returned a non-null pointer. Convert those to hold the return from create() in the QScopedPointer<> and cast its data() to get a plain pointer for subsequent use. Split assorted lines that got long (or longer) as a result. Removed a fatuous empty constructor. Change-Id: I88abba9e7ea72e30c92a11a5af5f17486f07f847 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Port scenegraph autotest case for alpha batching problemLaszlo Agocs2021-05-114-1/+117
| | | | | | | | | | | | This should work as-is in 6.1 and newer, so it needs no specific fix. The autotest case added in 5.15(.5) is useful however to prevent future regressions, so port that from the 5.15 LTS commit a6705dc99a81b7eab35db61957963d375e723fce. Task-number: QTBUG-92984 Change-Id: Ifd6f807cc024395e8fe60ecf19785dd98152bbb5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* qmllint: Fix unknownBuiltins not being ignored in all casesMaximilian Goldstein2021-05-112-0/+6
| | | | | | | | Previously we only skipped over them when they occurred in a property access chain (not covering the beginning, methods etc.) now we should always ignore them safely. Change-Id: I405de6d97a15cba1db641b2c8310427cc9558d68 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlEngine::executeRuntimeFunction: pass return value as input argumentAndrei Golubev2021-05-112-27/+82
| | | | | | | | | Use the newer version of QV4::Function::call() that does not require manual JSCallData setup and is more optimal for AOT function calls Change-Id: I5a5e2d0477c0603b05b7213f1b2adcc34d156bf5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Move tools to libexecKai Köhne2021-05-113-4/+8
| | | | | | | | | | | | | | Move qmlimportscanner, qmltyperegistrar, qmljsrootgen, qmlcachegen to libexec These are internal tools that is not supposed to be run by the user directly. [ChangeLog][Linux] qmlimportscanner, qmltyperegistrar, qmljsrootgen, qmlcachegen tools got moved from QTDIR/bin into QTDIR/libexec directory. Task-number: QTBUG-88791 Change-Id: I2739044e872ec83ef7da7dd857c26395ecfd407d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Blacklist tst_QQuickGridView::snapToRow for Win 10 MinGW Developer buildHeikki Halmet2021-05-111-0/+1
| | | | | | | | Pick-to: 6.1 Pick-to: 6.0 Task-number: QTBUG-88644 Change-Id: I6ee6e443f68d628a28cc0101670dac86721d58cf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Apply constant binding removal optimization to QProperty bindingsFabian Kosmale2021-05-102-0/+16
| | | | | | | | | | | | | | | | | | | This applies the logic from 7cb6dce1f3e140ea68d6b05281950f212fc99d38 to non-QQmlAbstractBinding bindings, too. The logic to detect whether a binding has no dependencies has consider the QPropertyBindingPrivate's dependency observer count. In addition, change the existing detection logic to remove properties without a context, too. The original logic probably wanted to guard against accessing binding->context()->unresolvedNames when context was nullptr; however, the check should have tested "context -> unresolvedNames", not "context and unresolvedNames". And after the refactoring which introduced hasUnresolvedNames() as a function, the context check became completely superfluous. Fixes: QTBUG-92996 Change-Id: Ia3bc39e184f431210b3bb2d38154acf820525e98 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: Do not write back value type references on const method callsUlf Hermann2021-05-101-1/+7
| | | | | | | | | | | The property setters can have side effects. We should only call them if really necessary. We don't have to write back after calling const methods. Fixes: QTBUG-93480 Change-Id: I53a246edd37b7f0c31f0e0effe5dfa996548f74c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Add support for QTextCharFormat::underlineColor in highlighers and CSSShawn Rutledge2021-05-076-0/+394
| | | | | | | | | | | | | | | | | | | | | When a QSyntaxHighlighter calls setUnderlineColor(), TextEdit will use that color for underline, overline and strikeout rendering. Likewise when Text has textFormat: Text.RichText and the HTML contains CSS styling specifying text-decoration-color, it will be applied (depending on the css support in QTextHtmlParser to call setUnderlineColor()). Added a manual test. [ChangeLog][QtQuick][TextEdit] When a QSyntaxHighlighter calls QTextFormat::setUnderlineColor(), or CSS style contains text-decoration-color, Text and TextEdit will now use that color for underline, overline and strikeout rendering. Task-number: QTBUG-87260 Task-number: QTBUG-74572 Task-number: QTBUG-39617 Change-Id: Ia2b564d5366ff67bb5df4f6c9e68ff5773ca5d6a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qquicktableview: upon forceLayout(), check for visible rows/columns at the ↵Richard Moe Gustavsen2021-05-061-0/+78
| | | | | | | | | | | | | | | | | | | | | origin There is a bug in TableView which will stop the user from scrolling/flicking back to the first column if it has become visible after first being hidden. The reason is that this is somewhat of a special case that happens only if the current left column is already at the origin of the viewport, since that will fool tableview into thinking that there can be no more columns in front of it. This patch add an extra section to the function that checks for visibility changes, to detect this special case. Fixes: QTBUG-93264 Pick-to: 6.1 5.15 Change-Id: Ieaad507b45ea11dc231519e9f49cbf182d6443ba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qv4engine: Fix enums getting turned into objects when passed in listsMaximilian Goldstein2021-05-063-2/+42
| | | | | | | | | | | | | Previously passing a QList of a registered enum would result in an array of objects instead of the array of numbers which usually represent enum values in QML. You now get an array of numbers as you would expect. [ChangeLog][QtQml][Important Behavior Changes] QJSEngine::toScriptValue() used to return a QVariant containing an enum, now it returns the enum directly. If you still wish to use valueOf() on the resulting value use QJSEngine::toManagedValue() instead. [ChangeLog][QtQml][Important Behavior Changes] A QList containing enums will now result in an array of numbers instead of an array of objects. Fixes: QTBUG-85861 Change-Id: I5c28f4489dfd02d8256aa818e27b1dd6b7d3113d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Make tst_qquickflickable check scaling of drag thresholdShawn Rutledge2021-05-061-3/+12
| | | | | | | | | | | | | | | | | We continue to enforce the drag threshold in local (transformed) coordinates: if Flickable should wait until the user drags 12 pixels, but it's scaled to half-size, it will start dragging after only 6 pixels of movement, for example. But if it's also rotated, then the required distance becomes a projection of the actual drag vector onto the vector along which the Flickable should move past the (scaled) drag threshold. I.e. if we rotate the Flickable's parent by 45°, the required distance should be 12 / 2 * √2 ≈ 8.5; 9 pixels will exceed the threshold, then. tst_qquickflickable::clickAndDragWhenTransformed is modified to prove it (at least when a 2D scale is applied). The test should be OK on hidpi because qApp->styleHints()->startDragDistance() is already adjusted. Change-Id: I035a462c75e7c5aba876a67c1b996bccab2c5364 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Begin testing QQDeliveryAgent subscenesShawn Rutledge2021-05-065-0/+270
| | | | | | | | | | | The first test is passiveGrabberOrder(), to verify that if the user interacts with handlers in a subscene and the root scene simultaneously, the passive grab order and the order of the signals from the handlers is deterministic: the subscene goes first because it's conceptually "on top". Change-Id: Id00ab1497fbd3c9d7afa02f8098699bd569ded70 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* V4: Write back value type references after function callsUlf Hermann2021-05-051-0/+60
| | | | | | | | | | | | If we call a function on a value type reference we have to assume that the value has changed. Therefore, we need to write back, just like we do when writing a property on the reference. Fixes: QTBUG-91783 Pick-to: 6.1 5.15 Change-Id: I6d2e957997d64e40e42eb5210350b6592a92ee26 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qmlcompiler_manual: fix QSKIPsAndrei Golubev2021-05-051-50/+79
| | | | | | | | | Due to bindings becoming eager, the old code in the tests got invalidated. Fix the issues by setting up context for each C++ object during construction Change-Id: I95004a0478b90033c5775b3bd16233dfd5a56e1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Keep DragHandler active while dragging even if other event happensFabian Kosmale2021-05-052-0/+105
| | | | | | | | | | | | | | | | | QQuickPointerHandler::handlePointerEvent() calls setActive(false) when wantsPointerEvent() returns false (except for a NativeGesture event), for the sake of deactivating reliably when it receives an event which it does not handle. Now we need one more exception, because it's not what we want in DragHandler while dragging: If we get a wheel event, that should not interrupt the current drag operation. Thus, we change the logic in wantsPointerEvent to consider even events we wouldn't normally handle while the DragHandler is active. In handlePointerEventImpl, we then simply ignore them. Fixes: QTBUG-91549 Pick-to: 6.1 5.15 Change-Id: I24e8bd890a21b244c9964f4df76986688085fa87 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use inexact comparison in tst_QQuickPinchArea::dragTransformedPinchAreaShawn Rutledge2021-05-041-1/+4
| | | | | | | | | | When rotating the parent by arbitrary angles and repeating the same pinch gestures, the actual displacement is not always quite consistent due to roundoff error. Within ±1 is close enough for testing. Task-number: QTBUG-63673 Change-Id: Ia193c4ff2a672b15443b445519d691e1342e57e9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make PinchArea translate correctly inside a rotated parentShawn Rutledge2021-05-042-0/+133
| | | | | | | Pick-to: 5.15 6.1 Fixes: QTBUG-63673 Change-Id: I91231bb8555b7eb02a9580f9f184b261d8bd44c8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* V4 Debugger: Collect locals also from block scopesUlf Hermann2021-05-043-2/+83
| | | | | | | | | Block scopes can contain "const" and "let" members. Fixes: QTBUG-92224 Pick-to: 5.15 6.1 Change-Id: Ie13d7d573e2759c510e1ea48c6edc68a095f40a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlPropertyValueInterceptor: Add binding interception supportFabian Kosmale2021-05-042-0/+55
| | | | | | | | | | | | | | | With the new property system, it is not enough to only intercept writes; we also need the ability to intercept calls to the bindable interface. This is done by adding a new bindable virtual method QQmlPropertyValueInterceptor. The default implementation does not do any interception at all for now. This allows us to keep the existing interceptors for now, and to port them step by step. Once all interceptors in Qt are ported, we can make the method in the interface pure virtual. Task-number: QTBUG-90999 Change-Id: I697658a1cd9a5204805a444e0d949213ba71b91c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Blacklist and fix failing tests on ARM macOSTor Arne Vestbø2021-05-042-0/+5
| | | | | | Task-number: QTQAINFRA-4431 Change-Id: I478128b9e7b45d5027e5d3d5ce388e5fc47587e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix warning about override in tst_qqmldebugtranslationserviceAndreas Buhr2021-05-041-1/+1
| | | | | Change-Id: I77187b62a428dd075d9cbddbc80b5fb5bf42eebd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QV4 Debugger: Show some diagnostics on malformed JSUlf Hermann2021-05-041-1/+6
| | | | | Change-Id: If99b9cec87f0817fd4ff710e651b55bb96257b17 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4 debugger: Properly count break pointsUlf Hermann2021-05-042-18/+86
| | | | | | | | | | | We cannot just take the number of active breakpoints as ID for the next one. It's possible to remove breakpoints after all. Fixes: QTBUG-93404 Pick-to: 5.15 6.1 Change-Id: Icde7a8e47c740e930f2313ffd9034b00033a54aa Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>