aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* QtQml: Integrate sequences with registration macrosUlf Hermann2020-11-113-8/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | You get to write QML_SEQUENTIAL_CONTAINER(value_type) now, and qmltyperegistrar will generate a sensible registration call from that. A registration might look like this: struct MyStringListForeign { Q_GADGET QML_ANONYMOUS QML_SEQUENTIAL_CONTAINER(QString) QML_FOREIGN(MyStringList) QML_ADDED_IN_VERSION(3, 1) }; It's unfortunate that we need to use a metaobject to transfer all of this information, but there is no other sensible way. Transform the containers defined in qv4sequenceobject.cpp to use the new style, and move them out of the builtins, into QtQml. Recognize that only one of them was ever tested, and add tests for the rest. Task-number: QTBUG-82443 Change-Id: I3a30f9e27266bb575eea26c5daf5dad1ec461cc5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qquickloader: Test setting source from component worksMaximilian Goldstein2020-11-114-0/+26
| | | | | | | Not verifying this works before has caused regressions. Change-Id: I4b99928bb6993d511349aec782660d24a134f67d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove debug usage of QT_FORCE_ASSERTSAlexandru Croitor2020-11-101-2/+0
| | | | | | | Amends a4d956048b4679bf5b448340d1f3428793699990 Change-Id: I9a44b6e800114968cb5e783282d439697b0a65a9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltyperegistrar: Add past-major-version optionMaximilian Goldstein2020-11-105-0/+19
| | | | | | | | Adds the option to specify past major versions of modules to be registered. This is necessary for modules that don't export any types themselves to work when built statically. Change-Id: I4b4a379f92707ec64cbb32f91db9d010440b95a2 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* Optimize particles vertex dataKaj Grönholm2020-11-092-7/+7
| | | | | | | | | | | | | | | | | | Use uchar instead of float for vertex data that doesn't need float. Continue using floats in shaders. Also remove animY2, which is same as animY1. These changes reduce memory usage especially when the amount of particles increases. Testing on windows, memory reductions with emitters/trailemitter example were: - OpenGL: 82.7 MB -> 76.5 MB - Vulkan: 130.8 MB -> 126.3 MB - D3D11: 143.7 MB -> 135.8 MB Task-number: QTBUG-88124 Change-Id: I8f8dcb3845323b0e69fb99b5bff830cd0f151a47 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* QML: Rewrite Qt object in actual C++Ulf Hermann2020-11-095-156/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite obviously, the Qt object is a singleton, extended with a namespace, backed by a member of the JavaScript global object. Defining all the methods as JavaScript functions is unnecessary and duplicates the general type transformation code. Also, it makes it hard to use those same methods from a C++ context as we cannot properly set up the arguments outside the JS engine. Rewriting the Qt object reveals some deficiencies in the old implementation that we need to fix now: 1. The enums of the Qt type were listed as properties of the Qt object, which means you could iterate them with a for..in loop in in JavaScript. This is just wrong. Enums are not properties. This functionality is deleted and the test adapted to check for each enum value separately. The commit message for the change that introduced the iterability already mentioned that the author had failed to find any occurrence of this in the real world. 2. Parsing time objects from strings was done by parsing the string as a date/time and then picking the time from that. We still support that for now, but output a (categorized) warning. Parsing the time directly is preferred where possible. 3. Previously you could create (invalid) dates and times from various kinds of QML types, like int and color. This does not work anymore as we now validate the types before calling the functions. 4. Passing more arguments to a function than the function accepted was unconditionally ignored before. Now, a Q_CLASSINFO on the surrounding class can specify that the arguments should be checked, in which case a JavaScript error is thrown if too many arguments are passed. In order for this to work correctly we also have to ignore JS undefined values as trailing arguments for overload resolution. This way, if a method matching the defined arguments exists, it will be preferred over a method that matches the full argument count, but possibly cannot accept undefined as parameter. Consequently a number of error messages change, which is reflected in the qqmlqt test. [ChangeLog][QtQMl][Important Behavior Changes] You can not iterate the enumerations of the Qt object in JavaScript anymore. This does not work with any other enumeration type either. You can of course still access them by name, for example as Qt.LeftButton or similar. [ChangeLog][QtQMl][Important Behavior Changes] The time formatting functions of the Qt object in QML now allow you to pass an actual time string, rather than a date/time string as argument. Passing a date/time string results in a warning now. [ChangeLog][QtQml][Important Behavior Changes] Functions in the Qt object for formatting date and time will now throw a JavaScript error when presented with a value of an incompatible type, such as int or color. [ChangeLog][QtQml][Important Behavior Changes] The Qt.resolvedUrl() function now returns a URL rather than a string. This follows the documentation. [ChangeLog][QtQml][Important Behavior Changes] The GlobalColor enum of the Qt namespace is not exposed to QML anymore. It did not make any sense before as the enum values could not be used as colors. Change-Id: I7fc2f24377eb2fde8f63a1ffac5548d652de7b12 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlListProperty: Use qsizetype rather than int for sizesUlf Hermann2020-11-094-9/+9
| | | | | | | | | | [ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype now as type for the size of a list. This is in line with the containers that you might use to back the list. Fixes: QTBUG-88269 Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qtdeclarative: finish fixing compilation with explicit QChar(int)David Faure2020-11-072-3/+3
| | | | | Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix misuses of the implicit QChar(int) constructorDavid Faure2020-11-072-4/+5
| | | | | | | | None of these cases intended to end up calling it, which proves that making it explicit (as will soon be the case) is a good idea. Change-Id: Ie60e85b554df956fd19bf86517945feac9f44b32 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* V4: Prevent heap objects from getting immediately swept by GCUlf Hermann2020-11-063-1/+97
| | | | | | | | | | | A destruction handler can cause a new object to be allocated during garbage collection. Depending on where in the heap the object ends up, it may be found during the sweep pass. As the mark pass had no chance to mark the object, we need to set the mark bit right at allocation time in this case. Change-Id: Ie43eeb548e78bd375b001b3a6bb4ef6596f91980 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Stabilize tst_QQuickDropArea::containsDrag_internalShawn Rutledge2020-11-061-5/+2
| | | | | | | | | | It seems timing-sensitive; as usual when we have processEvents() and then QCOMPARE, it's often better to just use QTRY_COMPARE in case it runs slower than expected on CI VMs. Fixes: QTBUG-88206 Change-Id: Ie6916a00e16e025c32940e6bffcabd1159480c5a Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix tst_QQuickText::fontSizeModeEskil Abrahamsen Blomfeldt2020-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The test hardcodes the height of the Text element to be 35, and then it does a pre-check that this is higher than the height of the font. This is obviously a bit flaky and caused an error because the font at the given size was 35.7 and was rounded up. I did attempt to make the logic a bit more dynamic, and have the object's initial height be based on the height of the font, but other parts of the test would then fail because they depend on the size of the object. In the end, the simplest way seemed to be to just decrease the font size until it fit inside the original Text height and leave it at that. Fixes: QTBUG-88207 Change-Id: I9c327806bde8c339b299302004dfb72b34e87bcd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* libinfix build: adjust qmldir entriesFabian Kosmale2020-11-062-1/+18
| | | | | | | Fixes: QTBUG-88209 Change-Id: Iae298355ce0b85945ea6c5c39805794f5f997845 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QML engine: fix conversion scores for sequences in CallOverloadedFabian Kosmale2020-11-043-0/+45
| | | | | | | | | | | | A QV4Sequence can be converted back to its underlying container; we therefore should give the conversion of QV4Sequence to container a high score if metaTypeForSequence and the target metatype agree. This has a larger effect in Qt 6 than in Qt 5, as we now can have new sequence types for any (QMeta)Container. Fixes: QTBUG-87616 Change-Id: I2bf02ebadbf9b707719d09edaf14b112eb2caf4f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update MetaType things in testsDavid Skoland2020-11-045-17/+14
| | | | | | | Also fix some minute errors. Change-Id: I1815224a6efdd7e619dfe5a5911d8b1166a3b3c8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Speed up tst_QQuickListView; round coordinate displayShawn Rutledge2020-11-032-3/+15
| | | | | Change-Id: I149258c69bac867a5d031b8d460e0192762fb8a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qqmlbinding: Do not leak componentFabian Kosmale2020-11-031-1/+2
| | | | | | | Change-Id: If562268b29fae9b0e0254719ce8d4489cfab2943 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-022-3/+2
| | | | | | | | All QFontDatabase APIs are static, use them accordingly. Task-number: QTBUG-88114 Change-Id: Iaa6be07e47adcdb5115e475cc5228f403e9a2b27 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qqmlbinding: Avoid event loop flakyness on Ubuntu 20.04Fabian Kosmale2020-11-021-2/+1
| | | | | | | | | | | | In a glib event loop, processEvents only processes events of the highest priority. Apparently, some higher priority event can occur which prevents the delayed binding from evaluating in time. Avoid the whole issue with QTRY_VERIFY, which runs the event loop multiple times if necessary. Task-number: QTBUG-86187 Change-Id: I796a2db1d017d389f198a24eb73d15da91ef0a65 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix compiler warnings from testsVolker Hilsheimer2020-11-022-7/+7
| | | | | | | | Replace foreach with ranged for; don't name unused function parameters. Change-Id: If0d9138261567edb14b72791799c6da1b16b5a5b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* Update tests to use new metaType systemDavid Skoland2020-11-0216-139/+138
| | | | | | | | Change from the QVariant enum to the QMetaType enum and prefer typeId over userType where possible Change-Id: Ic89c55978d46cc23d23b8e9c82c475c0c220fae3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QML: Allow singleton types to be extendedUlf Hermann2020-11-022-0/+47
| | | | | | | | | It seems we never stated that singletons can not be extended in our documentation. Therefore this is technically a bug fix and doesn't need separate documentation. Change-Id: I7877289bd5a52ecf709f80ba1975137981ec65f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Allow singletons to be created with a factory functionUlf Hermann2020-11-022-0/+37
| | | | | | | | | | This is in line with what we do on qmlRegisterSingletonType(), and it allows us to return singleton objects created independently of the instantiation mechanism. Change-Id: Ia6a077f5d22241593acd8cc87b3f65ae20f95667 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* QML: Allow namespaces as extensions to typesUlf Hermann2020-11-022-0/+50
| | | | | | | | | | | | | | | | | This way we can access the enums of namespaces as properties of the primary type. This is achieved by: 1. Making enums of extended types available in the base type 2. Allowing the extension to be specified as plain metaObject rather than as type name. 3. Refraining from creating the extension if the create function does not exist. The goal of this is to declare the Qt namespace in a civilized way, but will also help with cleaning up the QtQuick value types and their enums. Change-Id: I13399741d30ce38d1bff753cfa1b11e72ccfbf6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix tst_QQuickMultiPointTouchArea::inMouseAreaShawn Rutledge2020-10-291-2/+0
| | | | | | Task-number: QTBUG-86729 Change-Id: I4cf59a1afacd56be114393e70f132d25a8f084eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qmltest::event testsShawn Rutledge2020-10-292-15/+7
| | | | | | | | | | | | | | | - Stationary points are delivered like updated points after 05dc0a387ae324f2d6f3d7e633a0a49473f6957a - QQuickItemPrivate::localizedTouchEvent() seems to need to detach QEventPoint instances with Released state, to avoid losing the localization during delivery - calling stationary() or release() without position causes the event to occur at the middle of the item, not at the last-known position as the test was expecting Task-number: QTBUG-86729 Change-Id: I6bdcebc04a11d93d1d006f8269c1df2e9206a393 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_qquickitem::touchEventAcceptIgnoreShawn Rutledge2020-10-292-70/+24
| | | | | | | | | | | | | | This test (like many) is older than the setAcceptTouchEvents() function added in 1457df74f4c1d770e1e820de8cd082be1bd2489e. Now there are 3 cases: if we don't setAcceptTouchEvents(true), the item doesn't get any touch events; but if it does, it can accept or reject the individual events. For some reason the touch events were tediously created and sent before, but using QTest::touchEvent() simplifies it a lot. Task-number: QTBUG-86729 Change-Id: I2dd12af8c356c5455bd37d691fc24f3e1d9c107b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't send an item a mouse release with a button that it doesn't acceptShawn Rutledge2020-10-291-2/+0
| | | | | | | | | | | | | In tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons(), when the right mouse button release occurs, the item has a grab, but it's not interested in the right button, only the left. But of course we still want to deliver mouse drags, so if the button is NoButton and the item is the grabber, it gets the event. Task-number: QTBUG-31861 Task-number: QTBUG-86729 Change-Id: I952acc721a5f80a7fc5619c5fea640dae805e9c8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix and improve parts of tst_qquickitemShawn Rutledge2020-10-292-80/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reusable TestItem: - initialize variables where declared - don't accept touch events by default; the only test that uses touch is touchEventAcceptIgnore(), so it can do that for itself mouseGrab(): - don't skip it on Windows - construct items with explicit parents; we don't need QScopedPointer because the window is stack-allocated, and children get deleted - check grabber with QPointingDevicePrivate::firstPointExclusiveGrabber() rather than QQuickWindow::mouseGrabberItem() - remove qWait()s, use QTRY_COMPARE - QTRY_COMPARE hopefully shows enough info so we don't need to use QVERIFY2 with a custom message to compare equality - changing the grabber at a time when no event is being delivered is no longer supported (this was the part that needed blacklisting) - add a new stanza to test that mouse events don't propagate from the top item to the one underneath, if it neither accepts nor ignores it explicitly (analogous to mousePropagationToParent() but checking a sibling underneath, rather than a parent) hoverEvent(): - not sure why the comment from ede31210aafbfb961059a6e0934d6e6a79e06447 says QTest::mouseMove() didn't work, but nowadays it does Task-number: QTBUG-87947 Task-number: QTBUG-86729 Change-Id: I2627555e8bc0e4c3782239cb8ebde75395fea908 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add tst_qquickitem::mousePropagationToParent() testShawn Rutledge2020-10-291-5/+59
| | | | | | | | | Verify that events are pre-accepted, and that when an item doesn't touch the accepted state at all, it doesn't propagate to a parent item. Task-number: QTBUG-87947 Change-Id: I162cc860424aa736cc3650fd0daa2e7bc705fc70 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QML: Make date parsing more lenientFabian Kosmale2020-10-292-0/+13
| | | | | | | | | | | This fixes a regression from Qt 5 to Qt 6, because QDateTime is now apparently more strict in its parsing of RFC2822Date. The string in the test-case is not valid according to that spec, but JS engines like V8 still accept it, and so did we in Qt 5. Fixes: QTBUG-87610 Change-Id: I2c6eb2087e4845b04fa0dc4f7aa9a229b3428a43 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Improve tst_TouchMouse::pinchOnFlickableShawn Rutledge2020-10-281-40/+23
| | | | | | | | | | | - use for loops instead of tedious repetition - compare instead of verify to check negative bools - QTRY_COMPARE instead of qWait - move touchpoints by drag threshold to ensure repeatability: both flickable and pincharea wait for the threshold to start reacting Change-Id: I071fc05280e2156223af57d97079516987a744ab Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make touchmouse pinch test qml manually testable and visually sensibleShawn Rutledge2020-10-282-14/+21
| | | | | | | | | | | - There was no reason to import Qt.test - Make colors less garish - Explain what the rectangle is for (it's not the only place for pinching, and the appearance is a bit misleading) - Show click feedback at the position instead of toggling colors Change-Id: Id75a52e46a5e8611a57eb69a037cced9a9f7d54f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Standardize QJsonArray iterationDavid Skoland2020-10-282-2/+2
| | | | | | | | | When using refs as loop variables, the clang compiler complains (with default settings). This prevents that. Note that QJsonValueRef is used "behind the scenes", which makes this iteration method correct. Change-Id: I5a5f58ca8ad3887bce2009231cbae5a57c107697 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Inline components: Fix custom parser supportFabian Kosmale2020-10-282-0/+24
| | | | | | | | | Fixes: QTBUG-85713 Fixes: QTBUG-87464 Pick-to: 5.15 5.15.2 Change-Id: I5c190ad2d02190de90260042cc06e51c1da01c63 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix tst_PointerHandlers::touchReleaseOutsideShawn Rutledge2020-10-272-3/+3
| | | | | | | | | In Qt 6, setAcceptTouchEvents(true) must be done explicitly for an item to receive touch events. Task-number: QTBUG-86729 Change-Id: Ib18db22b6a7213dfcfdf091d554ef60fbede6111 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_PointerHandlers::mouseEventDeliveryShawn Rutledge2020-10-272-9/+17
| | | | | | | | PointerHandlers see more events now. Task-number: QTBUG-86729 Change-Id: I4dbddc8b54292450cf5ffb77489178a8a824b90d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_PointerHandlers::touchEventDeliveryShawn Rutledge2020-10-272-20/+34
| | | | | | Task-number: QTBUG-86729 Change-Id: I47a0a4aad7cff956b2ebd450870d625f817690d4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tst_MouseAreaInterop::dragHandlerInSiblingStealing…ViaTouch()Shawn Rutledge2020-10-272-7/+8
| | | | | | | | | | | Check the actual touchpoint's grabbers instead of the synth-mouse. Anyway it looked odd to press touchPoint ID 1 and then look for the persistent point with ID 0 on the primary pointing device, which isn't always a mouse. Task-number: QTBUG-86729 Change-Id: I0a27fdd931059b30b0b5a54328bbef6254d26e04 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QmlCompiler: Introduce grouped scopesUlf Hermann2020-10-271-5/+3
| | | | | | | | This way we can analyze the left hand part of things like "anchors.fill: parent" in qmllint. Change-Id: I0f58312566c3d5062e0fb301c2bad908ab8b8cbb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist qmltestrunner::touch::test_secondWindow and othersShawn Rutledge2020-10-264-0/+16
| | | | | | Task-number: QTBUG-86729 Change-Id: Ia4db0a98a4977cb89799c5749983a370d35317a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix some compiler warnings in testsVolker Hilsheimer2020-10-262-17/+9
| | | | | | | | | | | Use char16_t instead of quint16 for arrays of 16bit strings. Use QKeyCombination API. As a drive-by, remove superfluous 0 from characters specified in hexadecimal. Change-Id: Ic52b1fdceaf3348a9b81c40814031e9c2e557dd9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich2020-10-231-2/+2
| | | | | | Task-number: QTBUG-87037 Change-Id: I1969dba3b6edfaf202a316576674efed481bb1e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix compiler warning: mark overrides as such, remove virtualVolker Hilsheimer2020-10-231-6/+6
| | | | | | Pick-to: 5.15 Change-Id: I77bd88eb0f277c139fd296c1dafa8b09517a3064 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQmlEngine: Add method to explicitly capture a propertyUlf Hermann2020-10-231-20/+33
| | | | | | | | | | Also, use that method to capture the uiLanguage notify signal. Previously the wrong signal was captured. The test still happened to pass because we manually re-evaluated all bindings when the uiLanguage property changed. Add a test which avoid that. Change-Id: I3961b60b365a8705930936f20881421bd4ceffe5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* TableView: ensure we rebuild the sync view, even when flicking on a sync ↵Richard Moe Gustavsen2020-10-231-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 Pick-to: 5.15 Change-Id: Ifc74473eb43406acaa8e24880066fb4ca89d3a4e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make tst_QQuickMultiPointTouchArea::inFlickable() more debuggableShawn Rutledge2020-10-222-102/+97
| | | | | | | | | | | | | | It was all-white despite having two items that react to events, which makes it hard to see what's failing when it fails. Use loops rather than tedious repetitive hard-coded moves to improve readability. "ensure that mouse events do not fall through to the Flickable" must include having the MPTA "eat" the mouse press. Change-Id: Ibca14709afbd561f03a62d74d10e6cae94ab302e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qquickfolderlistmodel: fix error checkingMitch Curtis2020-10-221-33/+14
| | | | | | | | | QTest macros don't prevent further execution when used outside of the test function, so the rest of these tests would still execute even if checkNoErrors() found errors. Change-Id: If80a5d73cbfa18d5009c84bf658f40684b99d8f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix compile warnings from testsVolker Hilsheimer2020-10-226-15/+13
| | | | | | | | | | | Use streaming operators for debug/warnings to avoid qsizehint/int conflicts. Don't ignore return values from [[no_discard]] functions. Don't copy elements from containers that return references. Remove unused variables. Change-Id: I7a0bef94a5e828bd8facee0c625ec48c3d1f1bdb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Resolve aliases in nested objectsUlf Hermann2020-10-223-0/+25
| | | | | | | So far we've just ignored them. Change-Id: I2ca522ef825a341a3f4bf1c2a42fb0376180cdda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>