aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove Qt Labs CalendarMitch Curtis2020-05-2829-837/+70
| | | | | | | | | | This is getting its own repository as part of the move to the marketplace. Task-number: QTBUG-84172 Pick-to: 5.15 Change-Id: I2f963c298d6ef95e0832f95aa1e1ea809f4867a2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Skip tests that use graphical effects on Win 7Mitch Curtis2020-05-262-0/+11
| | | | | | | | | It's not clear why these fail, but we can live without the test on Windows 7. Fixes: QTBUG-84443 Change-Id: Ib18dfc8e12528c5086d07d6018cda93fb6e8d30c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Listen for the LanguageChange event in event() instead of using filtersAndy Shaw2020-05-191-0/+1
| | | | | | | | | | Now that the LanguageChange event is sent to all top level windows to pass on down to items then we can drop the event filter and just listen for it in the event() function. Pick-to: 5.15 Change-Id: I6c9699a798680695ea1d0013266d3a034b74ae7b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove ignoreMessage from setOverlayParentToNullLaszlo Agocs2020-05-181-3/+0
| | | | | Change-Id: Ie678693280b374e5977a3870b395936d15023579 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Massage toolTipCrashOnClose testLaszlo Agocs2020-05-181-5/+0
| | | | | | | | | | | | | | | | | | QTest::ignoreMessage() has a feature, namely that: If the test finished and the message was not outputted, a test failure is appended to the test log. So here, if Graphical Effects is available, but not functional, ShaderEffect fails to initialize, which means the warning-to-be-skipped is never outputted. The test would pass (because the visual appearance does not matter), but the ignoreMessage() condition fails it. Adding a QSKIP is not a solution because ignoreMessage() would still do its check and fail the test! Therefore, remove the ignoreMessage() altogether. Change-Id: I3e096752dfc6894c77859e786c8a4cac01d6fc53 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tests for Qt.labs.platform/MenuItem.iconIvan Tkachenko2020-05-152-4/+10
| | | | | | | | | | Test that nested property icon.* can be used in this Qt.labs.platform version. Just checks that imports work and properties can be created. Task-number: QTBUG-84102 Pick-to: 5.15 Change-Id: I450a7fa2c5f257a7e6e1b07630f05f7662964cd0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Reduce dependencies on QtGraphicalEffectsMitch Curtis2020-05-134-0/+16
| | | | | | | | - Make QtGraphicalEffects optional in tests - Mention that QtGraphicalEffects is required for relevant examples Change-Id: I3ac7d06add931e0a10c3df7edc4e458ba5519c75 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* ComboBox: fix currentValue not being updated on model changesMitch Curtis2020-05-121-0/+49
| | | | | | | | | Make sure we call updateCurrentValue() where necessary. Fixes: QTBUG-83554 Pick-to: 5.15 Change-Id: Iad593c2fc094a26429de1eda91bbdb152ffee2c2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove bindings to parent in delegatesMitch Curtis2020-05-111-1/+1
| | | | | | | | | | | | | | | Until we've decided whether to a) document that properties of parent should not be bound to in delegates or b) fix the warning that results from doing so after 8c72e634b3b0eacbfdee883bfc34994d3c19ed77, we can pre-emptively clean up a few places where it happens. Task-number: QTBUG-81976 Task-number: QTBUG-82393 Task-number: QTBUG-82989 Pick-to: 5.15 Change-Id: I1e610613f6016ec1b9cf9ca33cdfb15d384731a8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Menu: remove deprecated removeItem(var) overloadMitch Curtis2020-05-113-12/+2
| | | | | | | | | [ChangeLog][Controls][Menu] The deprecated removeItem(var) function was removed. removeItem(Item) or takeItem(int) can be used instead. Change-Id: I79757c22b4f81e1b380798623bd1f15eb09c1647 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove flaky test_openDuringExitTransitionWithTimeout() testMitch Curtis2020-05-111-29/+0
| | | | | | | | | | | | | | This was added in c1420ee5423dfa104d5ff87bc529b4530dc998d6. It has been randomly failing ever since, even after an attempt to stabilise it in 20c35f9a2b5fd970d43efc98c324e1e4c9dd153d. We can live without a test for this if it's going to cause so much trouble. Change-Id: I503bda6703a658feff288905132fce13fd01a74c Fixes: QTBUG-82643 Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix -no-accessibility buildPeter Varga2020-05-111-0/+1
| | | | | | Change-Id: Icbae79fd0f48fb9351ee8cc12b35ead7e99b09e2 Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Container: remove deprecated removeItem(var) overloadMitch Curtis2020-05-114-26/+20
| | | | | | | | | [ChangeLog][Controls][Container] The deprecated removeItem(var) function was removed. removeItem(Item) or takeItem(int) can be used instead. Change-Id: Ibc693a9216cd039fc11cb4e5182f74a96f493796 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Revert "tst_qquickmenu: fix flakiness resulting from floating point comparison"Mitch Curtis2020-05-071-11/+10
| | | | | | | | | | | This reverts commit c463f09fcb63927c66bc3307ddcc88d85d38b2bc. After c78a960198d59fb9a9ddd83ad7098b1db396edfd in qtbase, this shouldn't be necessary. Pick-to: 5.15 Change-Id: I1789eae295b1ebc44630b758414087344909ea60 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Expect failure for certain fonts in TextArea testEskil Abrahamsen Blomfeldt2020-04-301-2/+20
| | | | | | | | | | | | | | Change f761ad3cd9ad1252f24b76ae413298dc7bed8af3 in qtbase exposes a pre-existing difference in measuring the height of QTextLayouts versus QTextDocuments when the leading is large enough to impact the font height. See QTBUG-82954 for details on this. Note that this is equivalent to the fix for the same issue in the QLabel test: c4ef0b92d5fb2c621e880347bd48d01b6f31eb24 Task-number: QTBUG-82954 Change-Id: Idee81dcceefe594059a06bd1f090650acd738f79 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_qquickmenu: fix flakiness resulting from floating point comparisonMitch Curtis2020-04-151-10/+11
| | | | | | | | | | | | From the docs of QCOMPARE: "[...] expecting 0 can fail when the actual value may be affected by rounding errors. One solution to this is to offset both actual and expected values by adding some suitable constant (such as 1)." Pick-to: 5.15 Change-Id: Ie7c0db9b4eb6c7d9fdb503421242d309a39bc2ec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-315-8/+233
|\ | | | | | | Change-Id: Ie09cfdd17b00e56f3ba8677d25b24417dd4e42f6
| * tst_qquickheaderview: wait for window to be activeRichard Moe Gustavsen2020-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tst_QQuickHeaderView::listModel test fails on Ubuntu. From inspecting the build log, VerticalHeaderView has an empty size. Since HeaderView will only load items that end up visible in the view, it will load just one item in this case, even if the model contains five. Hence the test will fail when searching for the other missing items. Why VerticalTableView has an empty size is not well understood (and cannot be reproduced on my mac). The size is bound to the size of the window, which indicates that the window is not shown or ready by the time the test runs. So this patch will change how we create the window for the test, and wait for it to be active, which is standard procedure for many other tests. Hopefully this will also fix the test failure on Ubuntu. Task-number: QTBUG-83172 Change-Id: I7d3a188dbeb161f11eee7b95c103928404161f11 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * HeaderView: Add support for list based modelsAndy Shaw2020-03-242-0/+141
| | | | | | | | | | Change-Id: I411136bd2b9a277d84a7c68c55bb1c317b6cc9d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-211-8/+9
| |\ | | | | | | | | | Change-Id: I9ecddc7a68da4f15ee2c2904e237496eb6a2aa26
| | * Menu: account for the scale when getting the size before positioningAndy Shaw2020-03-181-8/+9
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-73687 Change-Id: Id2d6a6b5c6651337ab7ae26d07011160b79654bf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Account for the padding around a menu when checking if it is interactiveAndy Shaw2020-03-182-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is padding around the menu then it will mean the available height is smaller than the containing item and as such should be interactive. Fixes: QTBUG-82473 Change-Id: Ie3e7568ab66aa3da93e5448c1a27c9bd2a5e486a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Fix Qt 6 to-do comments in QML filesMitch Curtis2020-03-232-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove what appears to be code for backwards compatibility in the sizing of certain controls. Removing the code shows no discernible difference in the appearance of those controls. [ChangeLog][Controls][Tumbler] implicitWidth and implicitHeight must now be provided for Tumbler's contentItem, as with all other controls. Change-Id: Id858b6d13bfd81d8f30be57290fb260404652a4c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove the remaining usages of QRegExp and QRegExpValidatorLars Knoll2020-03-193-12/+12
| | | | | | | | | | | | | | | Change-Id: Iab8e682eeb43b3403eba37f7decb7f7a494ae361 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove old QQuickPalette implementationVitaly Fanaskov2020-03-185-67/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing implementation was removed in order to reduce massive code duplication and simplify color resolving process. Unit tests were fixed accordingly. See related changes in the qtdeclarative module for the further details. [ChangeLog][General] the palette API is a part of QQuickItem now. Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-03-181-1/+69
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-181-1/+69
| |\| | | | | | | | | | | | | | Change-Id: I88990095b97a4088f9fda6c9496fd69d4556f6a1
| | * | SplitView: fix hidden items causing visible items to not be resizableMitch Curtis2020-03-131-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a handle is dragged, the items on either side of it are resized. Until this patch, we were assuming that the item after the one at the handle index was visible, which was wrong. Now we iterate through each item after the one at the pressed index until we find one that's visible. Since we need this in a few other places during a handle drag, we cache it as a member variable. This patch also fixes an issue where the visibility of handles were not updated after setting a new handle delegate. Change-Id: Icd246abae2ed4dc6c3b81217b9a241b7e4debf7d Fixes: QTBUG-81867 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | CMake: Regenerate projectswip/cmakeAlexandru Croitor2020-03-1728-203/+241
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifd6b2289de6465a010f5f2a32789221767b4d5be Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-17138-65/+13970
|\| | | | | | | | | | | | | | | Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
| * | | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-1029-19/+1414
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: Ifc09ea9f71fdba119fe8eed99f0bdcb402444f27
| | * | HeaderView: set implicitSize on the style itemsv5.15.0-beta2Richard Moe Gustavsen2020-03-102-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting an implicit size, the user don't need to set a width or height on a HeaderView himself, but it will get the default size recommended by the style. By doing it the way it's done in the patch we achieve the following: 1. A HeaderView will by default be resized to be the same size as the delegate. 2. If the application sets a size on HeaderView it that is larger than the implicit size of the delegate, the delegate will be resized to have the same size (effectively filling out the free space in the header). 3. If the size of HeaderView is smaller than the implicit size of the delegate, the delegate will simply be clipped. (effectivly saying that the implicitSize of the delegate is also it's minimum size). If this is not acceptable for the application, it will need to use a custom delegate. Since a HeaderView delegate is a component and not an item, it should not be a part of the sanity checks we do to avoid using internal IDs. Hence we blacklist until we have a better way of handling such cases. Task-number: QTPM-1300 Change-Id: I30ca3e13ce5e1371b60f5c4ecf742a7d7e794a36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I3ed1abd00bf54da654c9ccade427f5756b99b595 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Update the current text after a translator is installedMitch Curtis2020-03-058-10/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that if the model is updated due to a retranslate that it gets the updated string and the ComboBox shows it correctly. Change-Id: Iecbc18a1051d6db13035b3efa393d9bf97788dd9 Fixes: QTBUG-82020 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | Attempt to stabilize test_openDuringExitTransitionWithTimeout()Mitch Curtis2020-03-041-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was unable to reproduce the failure, but this patch should hopefully make the test more resilient to timing issues by not requiring that the popup's opened property is true, but rather that it was true at some point. Change-Id: Icbb0407683959b9fc01b3c0d66d632922363b5d9 Fixes: QTBUG-82643 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | Prepare for internal QML API changeSimon Hausmann2020-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DiagnosticMessage is getting its loc member back :) Change-Id: I07fd8b2b506bebb0acdbc20d6294d0f4b0e0214f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-225-7/+51
| | |\| | | | | | | | | | | | | Change-Id: Iff02839c8ace49582750e06fa1ea9c559f6c93fe
| | | * Fix clicked() being emitted after doubleClicked()Mitch Curtis2020-02-204-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do as MouseArea does, and keep track of double clicks ourselves, otherwise we think the second click is a regular click. This is for mouse events only; for touch we have bigger problems to solve first: QTBUG-82146 Change-Id: I46e816d0cfa1bab98a0a1685915842ebd176e762 Fixes: QTBUG-82032 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * ToolTip: fix timeout not activating if opened during exit transitionMitch Curtis2020-02-201-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a tooltip with an exit transition and a timeout is made visible during its exit transition, it would end up not timing out. This is because the change in the tooltip's visibility is what usually kicks off the timeout timer, but if there is no change in visibility (because the exit transition hadn't finished, so the tooltip was still visible), this won't happen. Fix the issue by calling startTimeout() in QQuickToolTip::setVisible(). Change-Id: I5f95a698e48f376c7597558572ac91625a276e53 Fixes: QTBUG-81935 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-158-0/+368
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: Id3bca2da290234f3c69845ffe18c6d9193a1bd28
| | | * Account for when a touch event is synthesized by Qt as a mouse eventAndy Shaw2020-02-073-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a control is on a Flickable with a pressDelay then any press events sent from a touch device will be replayed as mouse events due to the delay. As a result we cannot depend on the fact that we got the first press as a touch event when checking if the id matches before accepting it. So we need to keep the previous pos when it is a synthesized mouse event so we can ensure the release is also accepted. Fixes: QTBUG-77202 Change-Id: I6f5d8506bd803daf834093e8fd412504150c4ca6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | | * DialogButtonBox: don't change button text that has been explicitly setMitch Curtis2020-02-032-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a custom button is declared in a DialogButtonBox, qsTr() will take care of translation, and so we shouldn't touch it. Amends c18c7bd7f9596e5ad3d13876a91203e1ceba2544. Change-Id: I06221002cf850882f5318cf0a3ed86da35274d0c Fixes: QTBUG-81796 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | * Blacklist tst_QQuickMenu::popup on macOSTor Arne Vestbø2020-01-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It relies on moving the cursor. Task-number: QTBUG-76312 Change-Id: I317083b974d3e9e8d6d616dc3248ee64e0f36021 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * QQuickToolTip: prevent closing after invisible tooltip createdWang Chuan2020-01-112-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since all items using ToolTip attached property share the same ToolTip item, a dynamically created invisible Tooltip may unexpectedly close the current visible ToolTip. Fix this issue by checking the parent of ToolTip when trying to close it Fixes: QTBUG-78202 Change-Id: I0f6558040c6b8bf22240b0c94af912a43d525ed9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-118-0/+850
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Add HorizontalHeaderView and VerticalHeaderView. They are controls associated with TableView. Support flicking synchronization Support default, fusion, imagine, material and universal delegate styles. Fixes: QTPM-1300 Change-Id: Ie3f913dd616cda0d4e5a22a3d95baf71692370fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | Blacklist tst_QQuickMenu::popup on macOSTor Arne Vestbø2020-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It relies on moving the cursor. Task-number: QTBUG-76312 Change-Id: I317083b974d3e9e8d6d616dc3248ee64e0f36021 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit a2443f0a34da85de014b9507926c4ac415543b03) Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-08104-32/+12343
| |\| | | | | | | | | | | | | | Change-Id: I4b20284eb05b6277c758a1ab5579b803db9a84ca
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-30104-32/+12343
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_combobox.qml Change-Id: I8471cdac4397f77a8e58140d58c6b50d3c437928
| | | * Add binary compatibility file for qtquickcontrols2Milla Pohjanheimo2019-12-171-0/+11603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BC file built against 5.14.0 added. Change-Id: I3468f8166c812974500ad8209be184f44313776a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * StackView: fix an issue where the current item was hiddenMitch Curtis2019-12-121-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a StackView has an item A as the current item, calling replace(B) and then replace(A) would result in A being hidden when all transitions were finished. When an item is finishing its transition, we can check to see if that item exists in the stack (i.e. was pushed while it was transitioning), and if so, don't hide it. The patch is based on the one from Anthony Groyer. Fixes: QTBUG-57267 Change-Id: I441559c54a35c577261074bc7f0c923aeb3ca330 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>