summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix separate delete of window and windowcontainerAllan Sandfeld Jensen2022-05-231-2/+23
| | | | | | | | | | | | The documentation says we can change window parent to avoid the widget deleting the window. That didn't work as the widget didn't get the child-removed event as it wasn't the parent. This patch instead uses an event filter on the set parent. Pick-to: 6.3 6.2 Change-Id: I1f61d1832fcf3257722f305beeefd8f1abf1f656 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Don't hide a widget that is swapped into a hidden splitterVolker Hilsheimer2022-05-231-0/+43
| | | | | | | | | | | | | | | | | When replacing a widget in a hidden splitter, then we only need to keep the new widget hidden if the previous widget was hidden. If the new widget is not explicitly hidden, and the splitter is already visible, then we need to explicitly show the new widget. Augment test case; the existing test cases already cover swapping out a collapsed or hidden widget. Fixes: QTBUG-102134 Pick-to: 6.3 6.2 Change-Id: I9b60711a5c1cab79777ce4183783114a16ac3394 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix crash in tst_qquicktext::implicitSizeEskil Abrahamsen Blomfeldt2022-05-201-3/+2
| | | | | | | | | | | | | This reverts commit 1e938c348b936328fafbcaae4c0c7d91003143e5 and bb2f4d08d9d138e4f70d6d6db46e24e34500becc. bb2f4d08d9d causes the crash, but 1e938c348b93 amends it, so this reverts both. When the cause of the crash has been determined and mitigated, the patches can be recreated. Fixes: QTBUG-103719 Change-Id: Ifc36b3771a96f6c85387a5306a0402d4c508d006 Reviewed-by: David Faure <david.faure@kdab.com>
* xcb: Delete touch points without target windowsTang Haixiang2022-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When XCB_INPUT_TOUCH_BEGIN closes a popup, we then receive XCB_INPUT_TOUCH_END, and cannot find a target window (because it's destroyed). If we don't deliver it, we need to at least clear the stored point from QPointingDevicePrivate::activePoints. Then when we deliver the next touch press, m_fakeMouseSourcePointId also needs to be reset. It's now even more paramount that autotests (and real-world touchscreens) must never omit any active touchpoint from a touch event. If a point doesn't move, it must be included in the QTouchEvent, with Stationary state. If not, QGuiApp::processTouchEvent() could generate multiple TouchBegin events in a row, which gets other bits of logic confused, here and there. Fixes: QTBUG-94557 Fixes: QTBUG-98519 Fixes: QTBUG-102751 Fixes: QTBUG-103706 Pick-to: 6.2 6.3 5.15 Change-Id: Ia95e410a2bb8bc7784aa5d296fac2b89e53a9f55 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* unblacklist passing tests 2022Anna Wojciechowska2022-05-182-8/+0
| | | | | | Pick-to: 6.2 6.3 Change-Id: I7d37dd58eaede1bd0d1b53fe264b45be83cbca57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix memory leak in tst_qtreewidgetAndreas Buhr2022-05-181-0/+2
| | | | | | | | | | | Invalid inserts of items are tested. However, on an invalid insert of QTreeWidgetItem into QTreeWidget, the QTreeWidget does not take ownership of the to-be-inserted items. These items were leaked in the past. This patch introduces a scope-guard, so the items are not leaked. Change-Id: Ib53ac02605c3a3c0bd1ae69bbd0876f860d08093 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtWidgets: restore Qt 5 compatibility for save/restore stateGiuseppe D'Angelo2022-05-181-5/+32
| | | | | | | | | | | | | | | | | | | | | | | Several classes in QWidget use QDataStream internally in order to save and restore state. These QDataStream usages were not versioned, meaning that if Qt changes the serialization for some datatype, then the data saved between different Qt versions becomes incompatible. Note that the save/restore API in question just produce opaque blobs as QByteArrays -- the user has no control over the QDataStream objects and thus versions. Fix by version the usages. In QHeaderView this has caused a regression because QBitArray *did* change version between Qt 5 and 6. In general, using QDataStream without explicit versioning is a mistake, so deploy the same fix elsewhere as well. Fixes: QTBUG-99487 Pick-to: 5.15 6.2 6.3 Change-Id: I82bb5c266f4e5dedc0887cbef855dccab1015e29 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: <doctor.whom@gmail.com>
* QTextDocument/QGraphicsTextItem: skip layout in setTextWidth(0)David Faure2022-05-171-2/+3
| | | | | | | | | | | | | | | | | | In a QGraphicsTextItem without a width yet, there's no need to do any layouting. The use case is obviously items with an app-defined size, not the default where text items adapt to their contents. Results: 0.065 msecs to create a QGraphicsTextItem with some text (layouted) 0.036 msecs to set everything up in a QGraphicsTextItem with 0 width QTextEdit was abusing the width 0 to mean "no wrap, width comes from contents", but since the value -1 means that already in QTextDocument, QTextEdit now uses a width of -1 for that meaning. Change-Id: I67ad59c305e5dd34830886e4e6c56dde03c93668 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-16133-3593/+268
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add override keyword to avoid warning from compilerOliver Eftevaag2022-05-131-1/+1
| | | | | | | | | A class that reimplements a virtual function isn't using the override keyword, which generates a warning during compilation. Pick-to: 6.3 Change-Id: Ic39ea24993e031f95ac9e61c3285d3be05fe6c34 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove remnants of the old Intel C++ compilerThiago Macieira2022-05-112-2/+2
| | | | | | | | | | | | | We don't support it any more. I don't think it has ever properly compiled Qt 6 (and it's no longer working for me against GCC 12's libstdc++ headers). If you report a bug against it, Intel support's first question is if you can try instead the new Clang/LLVM-based oneAPI C++ compiler. So we support only that one, which identifies itself as Q_CC_CLANG. Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16eb57a092c8439e Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Blacklist: test cases blacklisted in tst_QDockWidget:CI Insignificant Platforms Monitor Bot2022-05-041-0/+2
| | | | | | | | | | - floatingTabs on qnx Pick-to: 6.2 Pick-to: 6.3 Task-number: QTBUG-103091 Change-Id: Ia8b4a60847ba27dd2e9e50148bbe1e37febe1498 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* tst_qitemdelegate: make it more robustGiuseppe D'Angelo2022-04-271-2/+1
| | | | | | | | | Remove a processEvents() call followed by a QCOMPARE and turn it into a QTRY_COMPARE. Otherwise it seems to be randomly failing on Ubuntu 22.04. Change-Id: I3c1b9d55c857c79ffd36aeb98971db60267adace Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QApplication: deliver activation events for non-widget windowsRichard Moe Gustavsen2022-04-211-0/+48
| | | | | | | | | | | | | | | | | | Problem: if you create a hybrid Widgets and Quick Controls application, you would need to use QApplication rather than QGuiApplication. But in that case, the QQuickWindows would never receive window activation events from QApplication. And this causes problems for controls, since, for example, the palettes in use there will never update upon activation changes, and instead sometimes get stuck as e.g QPalette::Inactive after application startup. This patch will make sure that we send out activation events also for QWindows that are not QWidgetWindows. Pick-to: 6.3 6.2 Change-Id: I649f5c653081c0c5249f4faf28a7de2c92f17421 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix QDockWidget parenting and dock permissionsAxel Spoerl2022-04-193-2/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check DockWidgetArea permissions of QDockWidgetGroupWindows with single dock widget. Obtain a dock widget's tab position from a dock widget group window if it can't be established otherwise. Remove hardcoded assumption that a dock widget is in the left dock. Both cases have lead to inconsistent entries and dangling pointers in QDockAreaLayoutInfo::item_list. Remove warning: QMainWindowLayout::tabPosition called with out-of-bounds value '0', which becomes obsolete by the fix. Create a QDockWidgetGroup window prepered to become a floating tab, whenever a dock widget is being hovered over. Store it in item_list so it can be found and deleted when required. No longer call e->ignore() after propagating close events to the first dock widget and thus preventing others from receiving the event. Add logging category qt.widgets.dockwidgets Update dock widget autotest with tests to check the fixes mentioned: plugging, unplugging, hiding, showing, closing and deleting. Blackist closeAndDelete, floatingTabs test on macos, QEMU, arm, android due to flaky isFloating() response after a dock widget has been closed or plugged. QSKIP dockPermissions and floatingTabs test on Windows due to mouse simulation malfunction. QSKIP hideAndShow test on Linux in case of xcb error (QTBUG-82059) Fixes: QTBUG-99136 Pick-to: 6.3 6.2 Change-Id: Ibd353e0acc9831a0d67c9f682429ab46b94bdbb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace uses of _qs with _s in testsSona Kurazyan2022-04-072-6/+9
| | | | | | Task-number: QTBUG-101408 Change-Id: If092a68828a1e8056259cf90d035d9a87989244b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Activate tst_qmessagebox for AndroidAndreas Buhr2022-04-051-1/+1
| | | | | | | | | | | | tst_qmessagebox was disabled because it crashed. It does not any more. Now it hangs, which is a new problem. Fixes: QTBUG-87671 Task-number: QTBUG-101217 Pick-to: 6.2 6.3 Change-Id: Iec15cf82a4112ee79182ec091622e40147bd3e7f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QSplitter: Don't move handle in non-pressed stateNodir Temirkhodjaev2022-04-051-0/+21
| | | | | | | Fixes: QTBUG-102249 Pick-to: 6.2 6.3 Change-Id: Ib1d74447e346760d1fc9960e11486e8dc7ea3bc0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Android: skip flaky tst_qcalendarwidget::showPrevNext()Assam Boudjelthia2022-04-041-0/+3
| | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-102258 Change-Id: I96b5003e0b4266250e526439370603b47562cdea Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revert "Activate all tst_qgridlayout tests on Android"Ivan Solovev2022-04-021-0/+3
| | | | | | | | | | This reverts commit b39d3cfe3077a22b6adeb820f625099dcbc1a46c. Reason for revert: the test fails in dev again Task-number: QTBUG-87404 Change-Id: Icc51e36e037e9c7e8154266def129dd8ad412775 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: skip few tst_qopenglwidget tests that crash on CIAssam Boudjelthia2022-04-021-1/+31
| | | | | | | | | | To allow other cases to run while finding the reason. Most of these cases fail only on CI and not locally. Pick-to: 6.3 6.2 Task-number: QTBUG-102043 Change-Id: Ib552ab00b4232f6aabdf85acf050633251d9e71d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: skip crashing tests tst_QOpenglWidget::clearAndResizeAndGrab()Assam Boudjelthia2022-03-301-0/+3
| | | | | | | | | | | Skip the crashing case temporarily to allow other tests to run while finding a fix. Pick-to: 6.2 6.3 Task-number: QTBUG-100470 Task-number: QTBUG-102043 Change-Id: I8b16f95e5c66b95cc9959494b5317d39d58194e6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: fix fullscreen handlingIvan Solovev2022-03-291-0/+37
| | | | | | | | | | | | | | | | Commit a35a7fcb5a713956e97bc87ccbd273737c7418df introduced the usage of insets to correctly take into account the default Android status bars and other reserved regions. However in practice that does not work as expected - the bottom inset is always reported to be non-zero, even when fullscreen mode is enabled. To fix the issue, FLAG_FULLSCREEN is explicitly checked before applying the insets. Fixes: QTBUG-99624 Pick-to: 6.3 6.2 Change-Id: I8b25f0b06447cd452c42ef072493e3137e25f38b Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: activate tst_QWidgetIvan Solovev2022-03-293-35/+54
| | | | | | | | | | | | Fix some obvious issues, QSKIP or blacklist other problems. This does not fix all the test failures, but allows to enable most of the test cases, so that we could catch future regressions. Task-number: QTBUG-87668 Pick-to: 6.3 6.2 Change-Id: I1ed0b476d4ac55c658c572cfa1379fcdc6137ee8 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: re-enable skipped testsIvan Solovev2022-03-293-10/+0
| | | | | | | | | | | | | Now when 71b3d18ea7962a01413966f793e8187c9e91685e is merged, we can re-enable the previously skipped tests, as they do not crash anymore. Task-number: QTBUG-101423 Task-number: QTBUG-101321 Task-number: QTBUG-87417 Pick-to: 6.3 6.2 Change-Id: I6b4b3619b0af5e48b5e92b514bc0ab6586a76d51 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Notify about focus object changes upon widget destructionVolker Hilsheimer2022-03-251-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | If the active QWidget gets destroyed, then QWidgetWindow::focusObject will return nullptr. If then no other object takes focus, then we'd never emit change signals, and QGuiApplication's _q_updateFocusObject (which then informs the input context and emits signals) didn't get called. This left the input context with a dangling focus object pointer, which resulted in crashes. If the QWidget clears its focus, but the corresponding window doesn't know that it had focus, then fall back to the widget's focus widget to see if we have a change in focus, so that signals get emitted. Add a test case that shows that we didn't call _q_updateFocusObject by counting emissions of the QGuiApplication::focusObjectChanged signal, which we emit in this function. The signal is emitted more than once both when showing a widget, and now also when destroying a widget that has a focus child. The former is a previous issue, the latter is an improvement to not emitting the signal at all. Pick-to: 6.3 6.2 Fixes: QTBUG-101423 Fixes: QTBUG-101321 Change-Id: Ib96a397211d442f52ce795a3eebd055a0ef51b0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix compiler warnings in testsVolker Hilsheimer2022-03-241-1/+1
| | | | | | | | Don't mix unsigned and signed types in comparisons. Pick-to: 6.3 Change-Id: Ia4ba9c114177425a21cadc8cafe8179928315a5d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QAbstractItemView: with single selection, deselect on Ctrl+ReleaseVolker Hilsheimer2022-03-241-0/+8
| | | | | | | | | | | | | | | | | After cbf1b4bc60bca3994b8f8685ee922e53a6b4eed2 the selected item got deselected on Ctrl+Press, which made Ctrl+dragging a selected item impossible. Only deselect on Ctrl+Release. Add scenario to existing test case, and update the documentation to clarify the properties involved, and to point out that the event parameter might be nullptr. Fixes: QTBUG-101647 Pick-to: 6.3 6.2 Change-Id: I749b1cb1a0a311f5c1d4c333984716f05f2c90b5 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Enderlein <volker.enderlein@ifm-chemnitz.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Android: activate tst_QLineEditIvan Solovev2022-03-233-8/+10
| | | | | | | | | | | | | | Skip some of the obviously failing QCompleter-related tests instead of blacklisting them. Skip a test that causes a crash. This allows to re-enable this test in CMakeLists.txt for Android. Task-number: QTBUG-87417 Pick-to: 6.3 6.2 Change-Id: Ie7ee708df8ceddf117689e8ac749850ba86e8816 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Try to stabilize QWidget::enterLeaveOnWindowShowHideVolker Hilsheimer2022-03-231-2/+5
| | | | | | | | | | | | | | | | | | The test is very flaky on Windows 11. Make sure that we have a secondary window to close before proceeding, and wait for fade effects to finish, otherwise we might never get the leave event from the windowing system. Also replace a QVERIFY(qWaitFor) construct with a simple QTRY_VERIFY. With these changes, a local run of 20 repeats of this test on a stressed VM improves from 75% to 100%. Pick-to: 6.3 6.2 Fixes: QTBUG-98477 Change-Id: Iedcc175b336e3cab23817b954aba1736d02f1b9d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Android: Blacklist failing tests on tst_QGraphicsProxyWidgetSamuel Mira2022-03-221-0/+6
| | | | | | | | | | Backlist failing tests on Android. To be fixed later. Task-number: QTBUG-100470 Task-number: QTBUG-101888 Pick-to: 5.15 6.2 6.3 Change-Id: Iaa33b555f6063702af683c683e0b07ce2910fe13 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Build QMenuBar test without warningVolker Hilsheimer2022-03-201-1/+1
| | | | | | | | Adapt to changes in QWidget::addAction API from 08e4d2db084f6abbf1840ff. Pick-to: 6.3 Change-Id: If6e05b47de88cf55070238f08b96586b855cc5c1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QObject: restore flags printing in dumpObjectTree()Marc Mutz2022-03-191-0/+40
| | | | | | | | | | | | | | | | | | | | This was lost when QtCore, QtGui and QtWidgets were split up. Restored now via a virtual function on QObjectPrivate. Chose to return std::string instead of QString or QByteArray because its SSO is usually sufficient to hold these flag strings. [ChangeLog][QtCore][QObject] Restored printing of Qt3-style information from dumpObjectTree(). [ChangeLog][QtWidgets][QWidget] Restored printing of Qt3-style information from QWidget::dumpObjectTree(). Fixes: QTBUG-101732 Change-Id: I39ff5728ea5f5abbdbf81b5d7e13b8d16b6ee8b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* When clearing selected items, iterate over a copy of the QSetVolker Hilsheimer2022-03-181-0/+69
| | | | | | | | | | | | | | | | Selection change handlers of the items might call a method that implicitly recreates the selectedItems QSet, which then invalidates the iterators of the ranged for loop, resulting in crashes. Iterate over a copy of the set instead. Add a test case that crashen without the fix. Fixes: QTBUG-101651 Pick-to: 6.3 6.2 Change-Id: I6da6f4043fe1906b0186931a37283f635cb5a404 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Android: use empty Intent to clear clipboard data on API < 28Ivan Solovev2022-03-181-4/+0
| | | | | | | | | | | | | | | | ClipboardManager didn't have any APIs to clear clipboard data before API level 28. As a workaround an empty Intent with MIMETYPE_UNKNOWN is created and inserted into the clipboard for lower API levels. This makes the QApplication::clipboard()->clear() method work more or less as expected. This allows to unblacklist tst_QPlainTextEdit::copyAvailable(). Task-number: QTBUG-87423 Task-number: QTBUG-89402 Pick-to: 6.3 6.2 Change-Id: I454376199cf3b8eed0fa2ecf2f85b87f40892280 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Tests: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | Change-Id: Ibc6a948480a904913a5427e6408d4d296784fb4f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Exercise reparenting more in QOpenGLWidget autotestLaszlo Agocs2022-03-171-1/+65
| | | | | Change-Id: I771250ba889835e886c2801066ef023d82c5186d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Repair some of tst_qtableview tests on AndroidAndreas Buhr2022-03-152-3/+2
| | | | | | | | | | | | | The test task191545_dragSelectRows relied on the fact that the view is not scrolling. But on a small screen, it scrolls automatically. Fixes: QTBUG-87407 Pick-to: 6.2 6.3 Change-Id: I691361c965ab03d8a012f2b83715c7c96d990ec5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Android: expect QPlainTextEdit::canPaste() to fail after clipboard clearAssam Boudjelthia2022-03-151-0/+4
| | | | | | | | | | | Android 9 introduce an API call to clear the clipboard, before that it wasn't possible to do that, the test QPlainTextEdit::canPaste() should expect that to fail. Pick-to: 6.3 6.2 Task-number: QTBUG-100470 Change-Id: Ie2d8aabf77672c62b3a6c72a080a4e37f1696303 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QFormLayout: Fix assert when showing with hidden rowsVolker Hilsheimer2022-03-151-0/+23
| | | | | | | | | | | | | | | | | | Amends a74cdf778c0c72fa22d9354207d729b2cbf88128, after which the initialization of items in invisible rows is skipped. Since data members in QFormLayoutItem were lazily initialized, this resulted in out-of-bounds access of QList entries. Use member initialization for all QFormLayoutItem fields, and check that vLayoutIndex is valid before using it to access the list entry. Skip labels and fields for which it is not initialized. Add test case. As a drive-by, silence the test's provoked warning messages via ignoreMessage. Change-Id: I374b414a51df20b9af3087a2676061fc6b7f23e2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix losing QOpenGLWidget paints when a child widget is invisibleLaszlo Agocs2022-03-141-0/+25
| | | | | | | | Pick-to: 6.3 6.2 Change-Id: I136b486d30e31acadd6b1b837dc7e834ee3e23fb Fixes: QTBUG-101620 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* QCompleter: fix crash when setting the same model twiceDavid Faure2022-03-131-0/+10
| | | | | | | | Found when retesting the testcase completer.zip from QTBUG-54642 Pick-to: 6.3 6.2 5.15 Change-Id: Id84eefeb3a33dc6d790cfa23755352381cc097a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add setCurrentId in QWizardAxel Spoerl2022-03-121-0/+40
| | | | | | | | | setCurrentId(int id) implemented incl. forward skip warning respective test added in tst_qwizard Fixes: QTBUG-99488 Change-Id: Ieaf31698baf1e8ec97484b4a221c8587385c9fb3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate {QString, QByteArray}::count()Sona Kurazyan2022-03-123-3/+3
| | | | | | | | | | | | And remove their uses. [ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count() and QByteArray::count() that take no parameters, to avoid confusion with the algorithm overloads of the same name. They can be replaced by size() or length() methods. Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not assume implicit string-ish → QColor conversionMarc Mutz2022-03-111-1/+1
| | | | | | | | We want to mark the corresponding QColor ctor(s) explicit. Use Qt::GlobalColor or the new QColor::fromString() instead. Change-Id: I68bf75a094e6821b97682de5a0ffd975834d22d0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QStyle: Fix cases when logicalValue is outside rangeRobert Löhning2022-03-101-0/+3
| | | | | | Change-Id: I410c40425d6677612dbe3a40cbaa1debba998064 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Widgets: use QPlatformTheme::ButtonPressKeys for pressing buttonsNoah Davis2022-03-098-2/+107
| | | | | | | | | QComboBox is included because it works like a button when it is not editable. QGroupBox is included because it has a checkbox and QCheckBox is a subclass of QAbstractButton. Change-Id: Iad89259314e77f78c915dce83ec601df94c88941 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QStyle: Fix overflows and crash when converting slider positionsRobert Löhning2022-03-091-0/+105
| | | | | | | | | Qt Creator crashes when max is INT_MAX and min is -1, see bugreport. Change-Id: I441e76c0ff87052083ed3d77e6085b186402e5d8 Fixes: QTBUG-101581 Pick-to: 6.2 6.3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move cursor out of the way before running testVolker Hilsheimer2022-03-081-1/+5
| | | | | | | | | Without this change, the test fails when run twice in a row. Also, skip the test if we can't move the cursor. Pick-to: 6.3 Change-Id: Ic45c073007d114fbd7825cedef6761c1e410b4af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Un-blacklist test that's always skipped on macOSVolker Hilsheimer2022-03-081-2/+0
| | | | | | Pick-to: 6.3 Change-Id: I045e1923b471f6bb1d482f32924f190a94b21d2a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>