aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Inline components: Fix custom parser supportFabian Kosmale2020-10-282-0/+24
| | | | | | | | | | Fixes: QTBUG-85713 Fixes: QTBUG-87464 Change-Id: I5c190ad2d02190de90260042cc06e51c1da01c63 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 2425cd478138c52694aaa20b7f7eb4a91d97b51c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TableView: ensure we rebuild the sync view, even when flicking on a sync ↵Richard Moe Gustavsen2020-10-261-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | view child When two table views are connect through the syncView property, both views will flick when you flick on either of them. This also means that if you fast-flick more than a page on the sync view child, the sync view needs to rebuild, like if you did the fast-flick directly on the sync view. Because we updated the sync view's viewportRect too soon while fast-flicking on the the sync child, we didn't detect that it was a fast-flick, and that a rebuild was needed. The result is that you could sometimes end up with the views getting out-of-sync. This patch will allow TableView to only move the viewport without updating the internal viewportRect while flicking. The viewportRect will instead be sync-ed at a later point, like we do when you flick on the sync view directly. This will ensure that we rebuild if needed, also while fast-flicking on the child view. Task-number: QTBUG-87821 Change-Id: Ifc74473eb43406acaa8e24880066fb4ca89d3a4e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit b5501e9043cabcbf74d3d53b424ece5deb706a27)
* Fix compiler warning: mark overrides as such, remove virtualVolker Hilsheimer2020-10-231-6/+6
| | | | | | | Change-Id: I77bd88eb0f277c139fd296c1dafa8b09517a3064 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit c31c4068f87bb65328b4d25ca0c8d428ab8f74a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update and activate tst_animatorsShawn Rutledge2020-10-233-20/+33
| | | | | | | | | | | | Amends a0f8be4021caa9bb5055923f0eea3bee0e345235; it's not clear if there's any reason we haven't been running this test all these years. But we need to use testFileUrl() for loading QML files, and some additional updates make it more like the other tests. Change-Id: I3ddcc993c4536c2d4d751a37c0425943c7d86766 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit ec9d125f553c073ec7a431114a568eaeb6534b63) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* TableView: ensure we update content size upon model changesRichard Moe Gustavsen2020-10-221-10/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tables of non-trivial sizes, we usually don't know what the content size will be unless we load all rows and columns, which we simply cannot do. Because of this, we have up till now chosen a strategy where we normally just calculate a predicted content size up-front, when we table is built, and afterwards just stick to that prediction. This strategy works for big tables that fills more than one size of the viewport, and if the number of rows and column in the model stays around the same. But for tables that start off smaller than the viewport, and later expands to grow out of it, it simply fails. And the failure is such that the tableview can get stuck, with no way way for the user to flick around to see the rest of the contents. An example is TreeView that might only show the root node at start-up, but as you start to expand the tree, it will quickly add more rows than what fits inside the viewport. And in that case, the contentHeight will be totally off, and in turn, make the scrollbar be based on wrong values, and sometimes not work at all (e.g if it has the flag Flickable::StopAtBounds). This patch will change the implementation so that we recalculate the content size whenever it should logially change. That is, if e.g the model add or remove rows and columns, or if you change spacing. This still doesn't mean that contentWidth/Height reports the correct size of the table, but at least it will be a better guestimate for smaller tables, and at the same time, work together with Flickable and ScrollBars. Fixes: QTBUG-87680 Change-Id: Ie2d2e7c1f1519dc7a5d5269a6d25e34cf441b3fe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit dac2c8aec4917742aed6e311cf542dc37da60809)
* QQuickShaderEffect: fix crash when hiding parentMitch Curtis2020-10-192-0/+147
| | | | | | | | | | | | | It's possible for itemChange to be called during destruction when deleting the QQuickShaderEffectImpl. We nullify m_impl before deleting it via another pointer to it, so we must check that it's not null before trying to use it. Fixes: QTBUG-86402 Change-Id: If4955445f7cc0d1f376bc9b86b95e1cca4d88ede Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 266cd7638d887b31d56964a0f13fe208821703b1) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix alwaysRunToEnd==true prevented complex Anim from stoppingPiotr Mikolajczyk2020-10-163-0/+163
| | | | | | | | | | | AnimatorProxyJob would not forward loopCount to the controlled job causing the sequential or parallel animation to go infinitely after attempt to stop Task-number: QTBUG-82890 Change-Id: I6a1ca787f06789064e05407bbe9ae5e5861f24d5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d66d0540dc323e6a536b952acedcfda70cd90c0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickTextEdit: ensure we update document width when padding has changedRichard Moe Gustavsen2020-10-082-0/+33
| | | | | | | | | | | | | | | | We use an if-test to check if the document width has changed before we set the new value. The problem is that the value we test against is different than the value we set. The result is that we can sometimes skip setting a new width on the document, even if padding has changed. This patch ensures that we use the same width for both testing and setting. Change-Id: Ia8391999e8cc2b5be72fe525d396bf8c17ba0fa2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 40993321cd67c1fe722977ed94c91cedff4bb1f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickListView: prevent mouse delivery in floating header or footerShawn Rutledge2020-10-072-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | Earlier we reimplemented the contains() method of ListView to prevent dragging in an Overlay or Pullback header or footer. But in QQuickWindow (QQuickWindowPrivate::pointerTargets()), an early check prevents delivery of pointer events to an item that is clipped and for which contains() returns false, and also to its children. In that case, the header or footer no longer responds to a mouse event even if you put a MouseArea in it. Reverts 6ad3445f1e159d9beea936b66d267dcaacdc5d6c; reimplemented using similar logic in a new QQuickListViewPrivate::wantsPointerEvent() method, overriding QQuickFlickablePrivate::wantsPointerEvent(), which is now checked in event-handling code in addition to checking the interactive flag. Done-with: Wang Chuan <ouchuanm@outlook.com> Task-number: QTBUG-74046 Fixes: QTBUG-85302 Change-Id: I9474f035d26b74ee36c0ac19e45a77de2e694bf1 Reviewed-by: Wang Chuan <ouchuanm@outlook.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 6857ad3e686a5e2b45d28a7f47dca3210608da50) Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmlformat: Fix computed property namesMaximilian Goldstein2020-10-073-0/+34
| | | | | | | | Fixes: QTBUG-87222 Change-Id: If1da02d503041009b82651e1087fb4a1bdd79d59 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 49391fcc41d871836868452b8300938d0b94f00e) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix formatting of for...of loops using array variablesMaximilian Goldstein2020-10-073-0/+28
| | | | | | | | Fixes: QTBUG-86980 Change-Id: Id27350821051709894c7645a362cfdf7ce0d279c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 9cfda79202c9c7955a1100861ed2135506302921) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix inline componentsMaximilian Goldstein2020-10-061-5/+2
| | | | | | | | Fixes: QTBUG-86979 Change-Id: Ie8863bc2ecf75a9dd8e4af5e96e48c30e7acbacd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ecd018b4833863e9f7b8cecc616f681c361957b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qqmlimport: Use stable_partition instead of stable_sortFabian Kosmale2020-09-282-12/+24
| | | | | | | | | | | | | We do not actually need to sort the imports list, we just require that all inline component imports come before all other imports. This avoids triggering a MSVC STL debug assertion about the used Compare function not actually creating a strict ordering. Fixes: QTBUG-86989 Change-Id: I381852392545287ec02b186fcb4f33be3ae95b33 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 3eb9ee34c06d54ea21fedd3188c60e536a487b1c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlformat: Fix multiline comment attachmentMaximilian Goldstein2020-09-163-0/+29
| | | | | | | Change-Id: I3ba8a4cd683df3309dd6df31b1fd426a0875f8fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5d9b0d30df831649ceed58fee778bb37ac6f630e) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlformat: Fix template literalsMaximilian Goldstein2020-09-043-0/+9
| | | | | | | Fixes: QTBUG-85317 Change-Id: I52589b681690a55f7bba7d7d9c675dc22ffa1587 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9df9059a4b88676c7352db92391de2c268550fc0)
* Improve lancelot test case for recursive ShaderEffectSourceEirik Aavitsland2020-08-272-29/+1
| | | | | | | | | | | | | | | Choose a rotation degree which makes it more obviously visible if it gets applied multiple times, and which avoids the risk of an accidental match by rotating a full round. As a drive-by, remove the second recursive test case, as it does not test anything other than the first. Change-Id: I019743cd8a85763c4704019f7fb7b24c3451308c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit ceb1d14bb30b560f20f2b5b3e75c8e228ddc0cb2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Follow layoutMirroring in Layout marginsDavid Edmundson2020-08-261-0/+41
| | | | | | | | | | | | | | | | If a layout is laid out left to right using the layoutDirection property, we want left Margins on the left, and rightMargin still on the right However, if a layout is mirrored, not only should the layout direction change but also the left margin should now be on the right and vice versa. Task-number: QTBUG-62989 Change-Id: Iaae4bc436fd1eb7f1947869563ac325f3d6b79bb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 16613f3741af013f7e380c98df6889d73512d0ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickLoader: make sure the status property change properlyWang Chuan2020-08-251-0/+3
| | | | | | | | | | | | | When we call [setSource] in qml, we will try to convert a qml value to a string which indicate the url we want to load. However, if this value is undefined, it will convert to a string with content "undefined", and then cause loading error. More worse, if there is a qml file named "undefined", it will be loaded to the Loader. Fixes: QTBUG-85938 Change-Id: I5b192ba84aa29532e547349bbf37d413c107d8e4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3d195d33ece3f8fd7cd7d8e6163fe038fc7fc036)
* QQuickLoader: make sure the status property change properlyWang Chuan2020-08-252-0/+32
| | | | | | | | | | | | | Since the invocation of [setSource] in qml will clear the old source url first, it is hard to decide whether we have changed the source url, especially when we call [setSource] with an empty string, and the loader's status won't change properly. Fixes: QTBUG-85938 Change-Id: If61a33c790a4fd6562611c4c50756bc5e213363a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3aa4cd682f52b70803cc3f72d732bde9987677dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update tst_DragHandler::mouseDragThreshold zero-threshold test caseShawn Rutledge2020-08-241-7/+8
| | | | | | | | | | | | | | | | | | After qtbase b50daef9771d8829fc7f808898cbe051a5464b79, a mouse move event that does not contain a mouse location different than the last known location is no longer delivered. It's intended to be OK to set DragHandler.threshold to 0, and this test was checking functionality in that case; but we now need to move the mouse at least one pixel to test it. Then, the drag threshold is immediately exceeded, the drag begins, translation starts to occur, etc. Amends ab5df626bef9365089ce716ce476bccae1d0a04b Task-number: QTBUG-85431 Change-Id: I89c0dc13ed06fbf1443f42fa5b63713da56ecf6d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 051e18a02fcdcb177cd602665424e53253f4d88c)
* QQmlObjectCreator: fix member func call with this == nullptrEvgeniy A. Dushistov2020-08-202-0/+20
| | | | | | | | | | | | | | | | The test example is based on qtvirtualkeyboard/src/virtualkeyboard/content/components/PopupList.qml Luckily ((QQmlPropertyCache *)nullptr) -> property(-1) is ended without access to this, so this was not caught before. But this is UB, plus I can not run Qt and my application compiled with -fsanitizer=X, because of it crashed after the first member function call with nullptr as this Pick-to: 5.15 Fixes: QTBUG-85605 Change-Id: If6a71fde9a14cc4f73139dfa0e6ee3005453104d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlInfo: print ancestor of object if it has no QML engineMitch Curtis2020-07-277-100/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | This results in the following message for objects without a QML engine: QML AttachedObject (parent or ancestor of Attached): Binding loop detected for property "a" for this QML file, named AttachedObject.qml: import QtQuick 2.0 import org.qtproject.Test 1.0 Item { Attached.a: Attached.a } This, in turn, allows the warning to be emitted via the QQmlEngine::warnings signal, since QQmlEnginePrivate::warning() is now passed a valid engine. This solves the awkward situation where a binding loop warning can not be detected at all by auto tests involving attached C++ objects (as message handlers do not receive these messages either). Change-Id: I07589974207bd5448d22a6086a52b9230d23e298 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 31c892118ce822ca2e7ded99ff261187ce4cf597)
* Replace Qt's MidButton with MiddleButtonEdward Welbourne2020-07-221-1/+1
| | | | | | | | | | | The latter has been the preferred name since Qt 4.7.0. Added a comment on where the old name is exposed to QML that it's only for backwards compatibility. Change-Id: I2c5088d597dd7327cc5899d06afb180d0ec2893e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3debb37250b2c57aaaf81940f9dfeb540fd4e380) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlIRLoader: Restore inline components correctlyFabian Kosmale2020-07-222-0/+24
| | | | | | | | | | | | | | | Whether a component is an inline component is not only stored in the flags, but also in the isInlineComponent member. Ideally, this should be unified and the member removed, but for now we just restore the value correctly. Adjusted tst_qmlcachegen::initTestCase so that we testFile and testFileUrl are actually usable in the test. Fixes: QTBUG-84237 Change-Id: I759cd6b8914b186b9e5c8118863fc8d0580d21af Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit b4d36a05be9f34976c1a1b5ea60ce03c4ab59a25) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* List QtQml, QtQml.Models, and QtQml.WorkerScript as dependenciesUlf Hermann2020-07-091-1/+6
| | | | | | | | | | This does not express the full scope of what is happening, but it might help tools figure out that the respective types will be available when QtQuick or QtQml are loaded. Task-number: QTBUG-84286 Change-Id: I60522e76fc15db0cccf900d7d2a10c50519ba877 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add binary compatibility files for QtDeclarative for 5.15Milla Pohjanheimo2020-07-084-0/+60489
| | | | | | | Binary compatibility files added. Change-Id: I47468e6a8ff43b27e3a0c6449b193cc23ce4c49d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Give a better score for methods with a convertable type when matchingAndy Shaw2020-07-073-0/+37
| | | | | | | | | | | | | When it is looking for a matching method based on the argument types, then if a QVariant can be converted to that type then it should give a better score for that method. This is so that it can see it as being more viable a choice when calling the method instead of potentially not being able to find a matching one. Change-Id: Ief7e11feacd1d0b0959330af2576c2d01affbc54 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a056cb9595ea4a41c93f4c912719f9523b943d3b) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix nested functionsMaximilian Goldstein2020-07-034-1/+38
| | | | | | | | Fixes: QTBUG-85035 Change-Id: I5e1cb003b7b84547e3408a086eebf3be740e6860 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit eb90e8ee3313bee547e6721a2649bf9ba84e3e5c) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix baseUrl returning an empty urlJaeyoon Jung2020-07-021-0/+13
| | | | | | | | | | | | Do not append the directory separator if the current path is the root directory. Otherwise it is treated as a remote path incorrectly and an empty url is returned as a result. Change-Id: Icc62114702265e9e1b247624370a78999e564d5f Task-number: QTBUG-83121 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit bba1b19a18a04060942e5580e36daccf9c830b61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlformat: Fix nested ifsMaximilian Goldstein2020-07-023-0/+67
| | | | | | | Fixes: QTBUG-85077 Change-Id: Ia2fec64a389fd7355f3fcf9438408b021c5abef4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit df1f4c9a9f3e3c60fdd43513fdc4926c0cbaa553)
* Fix MouseArea mouseX/mouseY coordinates while draggingShawn Rutledge2020-07-022-3/+94
| | | | | | | | | | | | | | | | | | When MouseArea is not anchored with the usual anchors.fill: parent, such that its position is not 0,0, calculating mouseX/mouseY as d->lastScenePos - mapToScene(position()) was wrong. It could be d->lastScenePos - mapToScene(QPointF()), but instead we use mapFromScene(d->lastScenePos) as in a few other places. Amends 8068e7b98cde09565efe27585b84e120f9c5ea99. Fixes: QTBUG-85111 Task-number: QTBUG-75993 Change-Id: If1440d05ec3b75d9f9f4802fbc361756fadb559e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 192609f2f8c2f5d8b48716af2166aaa8ad67e80b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revive QTQUICK_COMPILER_SKIPPED_RESOURCESUlf Hermann2020-07-023-2/+21
| | | | | | | | | There are valid reasons not to compile some resources with qmlcachegen. Fixes: QTBUG-85243 Change-Id: I9a1233864ed5dda0c264e61db596a9d8c80ea1f3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 41890402db086f4c61e052cef7659eb6b003dc77)
* qmlformat: Fix trailing newline in if blocksMaximilian Goldstein2020-07-026-3/+22
| | | | | | | Fixes: QTBUG-85003 Change-Id: Ie68c838c9bc1d52181a741871279bee5a8020855 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 15777b94ee96035be79b363f3b1e54f02b5d2cd5)
* qmlformat: Fix inline componentsMaximilian Goldstein2020-07-023-0/+23
| | | | | | | Fixes: QTBUG-85189 Change-Id: I2b30595b44d14b89406b126d3d148f51f8bfbca4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 88b3d1fd26b6b566ef00ae728051bff29455eea5)
* qmlformat: Fix multiline bindingsMaximilian Goldstein2020-07-023-0/+18
| | | | | | | | | | Some bindings may turn multiline while formatting. This change makes sure this is handled properly. Fixes: QTBUG-85289 Change-Id: I6df98b926d69a23480003c3d9705bc34c3dd0d5d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 38e0b279d9c36d029918a2d86575050d13778d86)
* qmlformat: Copy string literals verbatimMaximilian Goldstein2020-07-013-0/+15
| | | | | | | | | Copy string literals verbatim instead of reformatting them. Fixes: QTBUG-84599 Change-Id: I36307eb30faa586f50cf0ce2660fb4e2686a3e4a (cherry picked from commit 237a0e86c700116bfa55a1e1ee6fdabcc1ca5c9c) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Change the cursor within HoverHandler.marginShawn Rutledge2020-06-302-0/+71
| | | | | | | | | | | | | The visual cursor feedback was inconsistent with the hovered property when a margin is set. Amends 1c44804600ad3dbeb60d1f5209ce9cf937d30ab3 Fixes: QTBUG-85303 Task-number: QTBUG-68073 Change-Id: I25506baecaecbd6450a0e95786f103024b46b1b8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b1493678fc295765ce93e565c5194e860e746436)
* qv4dateobject.cpp: USE_QTZ_SYSTEM_TIMEZONE on more platformsUlf Hermann2020-06-251-0/+16
| | | | | | | | | | | | | | The only platform where we may have a semi-adequate native implementation of the time/date functions is windows. On all other platforms we should use QTimeZone::systemTimeZone() if possible as that at least gives us correct results when the system time zone doesn't change at runtime. Fixes: QTBUG-84474 Change-Id: I34b01e12a751ee1c9b17735810e62e2e847f8446 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 510253aa0996a89e6029d244002a08615b2fb65b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Warn circular dependency when loading typesJaeyoon Jung2020-06-163-0/+15
| | | | | | | | | | Detect a circular dependency between two QML types and print a warning message if found. Task-number: QTBUG-83354 Change-Id: I826b28775ba3212ccccaeb56d50b64fec6f38ea9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit f0c08dc2175cffadb73e06d2cc69a152002e0df0)
* Cull removed items from QQuickItemViewFabian Kosmale2020-06-152-0/+60
| | | | | | | | | | | | | Amends a20132c326f6d2c5fec848efb98dd86afb320e2a, which fixed a crash, but also prevented the item from being culled. This is fixed by narrowing the scope of the condition to affect only the caching related part. Fixes: QTBUG-84604 Change-Id: I9b8a1a148d6538a18280475d89b87a4049ff3465 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit ab03621516630991c7cc0fea3be79879efed23a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QQuickKeyNavigationAttached issueValery Volgutov2020-06-122-0/+54
| | | | | | | | | | | | | | | | | | | | | When Repeater used for Item creation, we have following issue: When Repeater creates a new item and this item tries to set keyboard.left or keyboard.right to another Repeater-created sibling, these items haven't been created yet, and we have issue with navigation keys. Set rightSet to true if right really changed. When object calls KeyboardNavigation::setRight(null), rightSet = true, but right field did not change (null). After that, navigation keys work incorrectly. The same for other cases. Task-number: QTBUG-83356 Change-Id: I9ea6d6a7d13ff989aac3d9e2d22467b48080de13 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit f07641b47a7c479894472e933d202bfcec0e222e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove quality evaluation in test stringEskil Abrahamsen Blomfeldt2020-06-102-2/+2
| | | | | | | | | | | | | | | It is not the test's place to evaluate the quality of the outline shader (which also looks perfectly fine unless you don't really like outlined text). And it looks unprofessional to use rude words to describe our code in manual tests. Strings in lancelot tests are also inefficient ways of reporting and tracking bugs if that was the intended use of this. Change-Id: Ib9fdb4e56539b9b02f8b3f1d06eb3e3beb51f8ef Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit facf085fbcf614a25c6cfdff39ad80a46180a322) Change-Id: Icc62114702265e9e1b247624370a78999e564d5f Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix race condition in QQmlData::createPropertyCacheFabian Kosmale2020-06-091-0/+23
| | | | | | | | | | | | | | As noted in QJSEnginePrivate::cache, there can be a race between calling addRef on the QQmlPropertyCache and another thread derefing and consequently deleting it. To avoid this, we introduce a doRef flag in QQmlMetaTypeData::propertyCache, which tells it to ref the the cache. This fixes the issue, as the QQmlMetaTypeDataPtr in propertyCache() acts as a mutex. Fixes: QTBUG-84692 Change-Id: I962d28cfd22696aad89a660e41c55f63a8791b44 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 90d24b807373f7b4c10d1a88ffdb5d4ebed08de8)
* qtdeclarative: Disable movingItemWithHoverHandler on macOSMaximilian Goldstein2020-06-091-0/+3
| | | | | | | | | | | | The cursor cannot be moved on macOS >= 10.14. Task-number: QTBUG-75786 Task-number: QTBUG-76312 Task-number: QTBUG-81884 Change-Id: Iec73d572d2ccc0a4be8cc6c2c0b445329a200609 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit f73dad1c991aa5adff14e42812da70db9ac52018) Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Blacklist tst_QQuickTextEdit::linkHover() on macOSFabian Kosmale2020-06-091-0/+5
| | | | | | | | | Task-number: QTBUG-75786 Task-number: QTBUG-82052 Change-Id: I2718ab6004ba7a278b1917a6164566d6e541fbdc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 5b203bc4647e8e9d8d3c1091ba791c9589243420) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist tst_QQuickTextInput::setInputMask() on macOsFabian Kosmale2020-06-091-0/+4
| | | | | | | | | Task-number: QTBUG-75786 Task-number: QTBUG-82058 Change-Id: Ida2a546044d4c85f3ec8037ff7e8f1fd2bd1f424 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit df075ee964fa41f95a0dd1f691c1547dc0b018dc) Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* QQuickTextNodeEngine: prevent renderring transparent selection colorWang Chuan2020-06-052-0/+44
| | | | | | | | | | | It is not necessary to render selection color which is transparent. Fixes: QTBUG-83819 Change-Id: I45c086652e194192619aad025121e6064ab37a58 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit bf8b45e33af960c03c7dccf56e90e76eda1f510e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix test to not depend on internal roundingAllan Sandfeld Jensen2020-05-291-1/+6
| | | | | | | Change-Id: I3c66cb52b435a891d88a5e1c9d1db155d63e2481 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7ac67ff82586cb9dd1afdf4c8030ace760b2a132) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve performance when dynamically adding items to a layoutJan Arve Sæther2020-05-263-25/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was especially noticeable when a Repeater was populating the children of a layout, and its model was dynamically changed: When the model was changed, the repeater removed one item at a time until all items were removed, then applied the new model and then added all the new items for the new model. The layout reacted to that by doing a full sync of the QML layout into the internal gridlayout engine each time an item got removed or added. For very large layouts (or layouts that have complex size hints to calculate), this caused a major slowdown. This patch fixes that by postponing the sync until we get a updatePolish(), basically replacing most calls to updateLayoutItems() (which does the sync) with a call to invalidate() (which schedules a polish). It will also get rid of some binding loop warnings due to this change. This means that there is a small change in behavior: impicitWidth, implicitHeight and Layout.{min,max}imum{Width,Height} might in some cases be incorrect until the updatePolish() have been done. (This is however consistent with how Row/Column/Grid behaves) The creation test in qmlbench was quite simple, so it did not suffer from the most severe performance issues, but we did not regress: > compareresults: auto/creation/layouts/delegates_rowlayout.qml: improvement by 3.91% auto/creation/layouts/delegates_columnlayout.qml: improvement by 6.59% auto/creation/layouts/delegates_gridlayout.qml: improvement by 1.83% Overall average of differences: 4.11% And for the gridlayout_large.qml (Repeater with 1000 dynamically changing items): > compareresults: auto/layouts/gridlayout_large.qml: improvement by 66477.78% Overall average of differences: 66477.78% [ChangeLog][Qt Quick Layouts] Performance improvements to Qt Quick Layouts. This has the small side-effect that size hints (implicitWidth/implicithHeight etc) changes are not immediately emitted after a layout has been modified (e.g item added) Fixes: QTBUG-71839 Fixes: QTBUG-65121 Fixes: QTBUG-66017 Change-Id: I6922efe449134246df66b177992e4442747bc8fb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit cc77a0bc549ce8f0b218661e7ae0e82e5b89e0da) Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Increase the timeout for tst_qmlminJan Arve Sæther2020-05-261-0/+3
| | | | | | | | | | | | This test has been flaky during CI runs (on macOS) because sometimes it takes more time to execute than the default 5 minutes limit. Probably not the ideal fix, but since this will be deprecated for Qt 6 there is no point in investing too much time into fixing it. Task-number: QTBUG-84339 Change-Id: Iab53a05a68c32a1fae56cafdeeb6aa74900ac9fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>