summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-301-0/+3
|\ | | | | | | Change-Id: I9935bacae0d6ba532418fc3d28adbc7ca1463604
| * Blacklist qgraphicsitem::sorting test on opensuse-42.3Kai Koehne2019-03-291-0/+3
| | | | | | | | | | | | Task-number: QTBUG-74760 Change-Id: I79bd58e6be61c59e0f1fa48dba0dee72e0a7e78c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Extend blacklistnig of tst_qwidgets to cover RHEL 7.6Tony Sarajärvi2019-03-291-0/+1
| | | | | | | | | | | | Task-number: QTBUG-46116 Change-Id: I7d74dca7030a9c21b3654e3b5cde94015497208e Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* | QDoubleSpinBox: reset size hint when prefix is setChristian Ehrlicher2019-03-262-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | QDoubleSpinBox did not resize when setPrefix() was called because the cached size hint was not reset. Fix it by resetting the cached size hints and update the geometry the same way it's done for QSpinBox::setPrefix(). Fixes: QTBUG-74520 Change-Id: I6f42a24ab0a4ce987ecbe1505a634d929474436b Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-261-0/+2
|\| | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| * Silence QMainWindow testFriedemann Kleint2019-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Set object names on the widgets in restoreState(), fixing: QWARN : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x7ffcb45e5e00 '; QWARN : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QToolBar 0x7ffcb45e5dd0 '' QWARN : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x7ffcb45e5e00 '; QWARN : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QToolBar 0x7ffcb45e5dd0 '' Task-number: QTBUG-74242 Change-Id: I19f19e93de9df00d001b820a31836ce0b3cd2877 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-201-0/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| * Use Q_UNUSED(updateRect) when building without QT_BUILD_INTERNALJesus Fernandez2019-03-181-0/+2
| | | | | | | | | | Change-Id: I3e5292bc09ae53bee5f8bb8c7c1922d1a20b2e10 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-282-0/+100
|\| | | | | | | Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
| * QListView: Fix Shift+click selection for non-default itemAlignmentAlexander Volkov2019-02-271-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QListView::setSelection() algorithm is designed for items to occupy their cells completely, which is not the case when itemAlignment is used. The middle part of the selection rect goes beyond the column borders and extra items are selected. Use the introduced cellRectForIndex() instead of rectForIndex() to calculate the middle part correctly. Fixes: QTBUG-73684 Change-Id: I4a1e42a056d56e85a16d8ae0ffe18b78d1d6deb7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Don't edit the item if we did not get the press event on the same itemAndy Shaw2019-02-261-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | With a QTreeView it is possible that collapsing an item can cause the item under the mouse to be a new one and over the checkbox area for the new item. As a result, a release can cause it to change the check state even though it did not get the press for that item. This ensures that it only allows the edit if it got the press as well. Fixes: QTBUG-61476 Change-Id: I9a0821466afc84c97c9819755ccbacd729f7fbd7 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-223-2/+18
|\| | | | | | | Change-Id: I9e7cb1b131b7b216aad8ed1b1536669fd1557c21
| * Remove "insignificant" flag from qfilesystemmodel testTony Sarajärvi2019-02-213-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Due to removal of insignificant flag in tst_qfilesystemmode.pro a bunch of tests will either fail or crash in different operating systems. Task-number: QTBUG-70572 Task-number: QTBUG-70573 Task-number: QTBUG-29403 Change-Id: I44925187acd72e600d2fec4f2604b67c66ecdd6b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-152-3/+10
|\| | | | | | | Change-Id: I8cad26f17834dbc9f7151edc0f17786f9e32025d
| * winrt: Handle WaitForWindowExposedOliver Wolff2019-02-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As winrt does not have native windows, exposure check was just done by checking, whether the window is the active window. If a window is shown fullscreen though, winrtscreen will be resized. This resize triggers a resize of every maximized or fullscreen window that is shown. If we enter or leave full screen mode, we have to wait until the screen resize and the subsequent window resizes are done and only then we can consider the windows properly exposed. This patch reverts 54bcb9d42f5ceaafcca426dc2a5cc25d299d5a3d and thus unblacklists tst_QGraphicsItem::cursor on WinRT. Fixes: QTBUG-73545 Change-Id: If469fce319ed6b3a5d56b7bf3cbc11929b72bb11 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * Fix QSpinBox tests failing after change in the Windows QPAAndre de la Rocha2019-02-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some QSpinBox tests start failing after reverting to using legacy mouse messages to handle mouse input in the Windows QPA. It seems to be caused by a test that runs before it and moves the mouse cursor. Then when the QSpinBox tests run, they create widgets that appear below the mouse cursor, causing some mouse events to be generating and messing with the events synthesized by the test itself. With the pointer messages being used for mouse input, the legacy mouse messages that are generated under this condition were being ignored. But by reverting to the old implementation, the legacy messages are handled again, causing the test to fail. This change moves the mouse pointer to a safe position during the test initialization, so it does not depend on the state left by previous tests. This change needs to be integrated together or before the change in the windows QPA. Change-Id: I91f7e9376dc495ee61250e0a7d908c1c2b685bc8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QtWidgets: mark QFileDialog functions as deprecatedChristian Ehrlicher2019-02-121-12/+12
| | | | | | | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QFileDialog::setConfirmOverwrite()/confirmOverwrite() - QFileDialog::setReadOnly()/isReadOnly() Change-Id: I3cc1df76c8e40e95b8e9893ae06ef488fad26fb6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Deduplicate QWidgetPrivate::invalidateBufferTor Arne Vestbø2019-02-121-5/+9
| | | | | | | | | | | | | | | | | | | | | | Now that MSVC (presumably) supports templates, we can merge the QRect and QRegion versions of the functions into one. The function has been renamed to invalidateBackingStore to better reflect what it's doing. Change-Id: I0e94a0cabd286cf97f2ba718a42ee0425f59d3ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_QMenu: skip part of menuSize_Scrolling testSamuli Piippo2019-02-091-0/+7
| | | | | | | | | | | | | | | | | | | | Test fails on minimal and offscreen platforms. Task-number: QTBUG-73522 Task-number: QTQAINFRA-2630 Change-Id: I6260454be35a8bbac1ab683d89fb7b262d3b69ab Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Fix deprecation warnings in widget autotestsChristian Ehrlicher2019-02-0823-219/+212
| | | | | | | | | | | | | | | | Fix all deprecation warnings within tests/auto/widgets Change-Id: I854f54c0a1dc0a0086f626b93cd39f63cb1b6033 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-083-5/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * Improve keyboard navigation in QListView when isWrapping is enabledAlexander Volkov2019-02-061-4/+21
| | | | | | | | | | | | | | | | | | | | Search the previous item or the next item in a model instead of searching them on visual layout. This way the cursor will not stop at the beginning or at the end of a row or a column. Fixes: QTBUG-14444 Change-Id: I0ef203a4dcd876e4c50559fb87e61585f07434d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Blacklist tst_QGraphicsItem::cursor on WinRTKari Oikarinen2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | It is the flaky test causing most failures in qtbase at the moment. Task-number: QTBUG-73545 Change-Id: Id9c5db27ebd08a4cf3c119d2fada12fdf1a5d2a0 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * tst_QHeaderView: fix defaultSectionSizeTest() on High-DPI screensChristian Ehrlicher2019-02-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QHeaderView::defaultSectionSizeTest() fails on High-DPI screens because the default minimum section size is greater than the values used for testing the header sizes. Therefore the test will fail. Fix it by explicitly setting the minimum header size to something smaller than the test values. Also add a debug line to output the default minimum section sizes so other failures due to this problem can be debugged better. Fixes: QTBUG-73309 Change-Id: I257f341cef9381f140aa4d4f68376c5edadc39cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Update bundled Freetype to 2.9.1Eskil Abrahamsen Blomfeldt2019-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is required to support the new emoji font on Android 9. [ChangeLog][Freetype] Upgraded bundled Freetype version to 2.9.1. This also adds support for the latest emoji font in use on Android 9. Fixes: QTBUG-70657 Change-Id: I99be72f0d23c20aca122b8fdadd4ded87b2edce1 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | QtWidgets: mark QDialog/QFileDialog functions as deprecatedChristian Ehrlicher2019-02-062-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - QDialog::setOrientation()/orientation() - QDialog::setExtension()/extension()/showExtension() - QFileDialog::setNameFilterDetailsVisible()/isNameFilterDetailsVisible() - QFileDialog::setResolveSymlinks()/resolveSymlinks() Change-Id: Ibbd5b4192ea8ab483d6b2a8dbf9879f29f9ee86d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-266-25/+74
|\| | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| * tst_QItemDelegate: try to stabilize combobox testChristian Ehrlicher2019-01-252-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QItemDelegate::comboBox() is flaky because sometimes the used QTableWidget does not yet have the focus which prevents a correct editing. Fix it by explictily setting the focus on the widget after it is shown. A similar fix was added for dateTimeEditor() in 9822d57d858068cfe5a07281ef069ef8c4c7b7b3. With this patch the test no longer fails for my on opensuse, therefore remove the blacklisting. Task-number: QTBUG-67282 Change-Id: I907db662ca347f8e8d31e5be215a100377b159ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-232-14/+55
| |\ | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | * Stabilize tst_QItemDelegate::dateTimeEditor()Friedemann Kleint2019-01-221-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | Add qWaitForWindowExposed() for the toplevel and use QTRY_VERIFY() for finding the delegates consistently. Change-Id: I430088a91b5cc1a8f856d0a58aba066b1baf179b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-083-340/+1131
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| | * | Drag'n'Drop: fix dnd when dragMoveEvent() is not implementedChristian Ehrlicher2019-01-071-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring of dnd with f8944a7f07112c85dc4f66848cabb490514cd28e added a regression which results in a need to reimplement dragMoveEvent() on the drop side. Before this change it was possible to accept the dnd in dragEnterEvent() without again accepting it in dragMoveEvent(). Fix it in a similar way it's done in QGuiApplicationPrivate::processDrag() by prefilling the first simulated QDragMoveEvent with the values from the previous QDragEnterEvent before it is sent to the drop receiver. Fixes: QTBUG-72844 Change-Id: I1300dd02b7f1d9dcd44ecefa8335f92ad6c6cafa Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | | Fix resolve() on fonts returned from QWidget::font()Allan Sandfeld Jensen2019-01-222-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the inherited properties as resolved on the font, so non-default values are passed on in contexts that does resolve logic like QPainter. One test is updated as it actually tests what it is supposed to on more configurations. Fixes: QTBUG-39560 Change-Id: Ief668e992ccdc091337a259a4c1306a00e67c73f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | tst_QGraphicsItem: stabilize cursor() testChristian Ehrlicher2019-01-221-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cursor test sometimes fails due to the fact that the topLevel widget has not yet reached it's fullscreen geometry. This means the QGraphicsView is to small and the test will fail. Avoid it by simply removing the topLevel widget since it's not used at all. Change-Id: Ia7b34f283a917a35b6665e6333a01378575a5a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-218-9/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * | | qWaitFor: Prevent being stuck in QCoreApplication::processEventsTor Arne Vestbø2019-01-097-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the overload of QCoreApplication::processEvents that takes a maxtime argument, the function will keep processing events until there are no more events, or until it times out. The problem is that the function doesn't distinguish between events that were on the event queue when the function was called, and events generated by processing events as part of its own execution. If for example a widget calls update() in its paintEvent, the function will spin for the entire duration of maxtime. That doesn't work for qWaitFor, where we need to check the predicate between each pass, so we use the overload of processEvents that doesn't take a maxtime. That's fine, as we have our own timeout logic. Change-Id: I9738d7d0187c36d4a5ddfcd3fd075b0bd84583c4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | Blacklist a flaky qtableview function in WinRTTony Sarajärvi2019-01-081-0/+2
| | |/ | |/| | | | | | | | | | | | | Task-number: QTBUG-72853 Change-Id: Iaf2b25712b571a3ce73387cb3d2e70d427808364 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Don't treat the ampersand in a titlebar as a mnemonicAndy Shaw2019-01-081-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the mnemonic has no meaning when it is in a dockwidget title, we should just treat it as a literal ampersand instead and display it as such. Fixes: QTBUG-54485 Change-Id: I96c856ce2771a68d226f48f8f47affc24f1c53cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-071-134/+0
|\| | | | | | | | | | | Change-Id: Ieb57137ee2b7d0c505e3531d5aa1bcb66978847e
| * | Remove dead codeVitaly Fanaskov2019-01-041-134/+0
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-44131 Change-Id: Ic092f2be5855840d6467560159c12f3c5aa36344 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-042-6/+129
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
| * | Respect roles of buttons added to QMessageBoxVitaly Fanaskov2019-01-031-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a button added to QMessageBox has AcceptRole or YesRole, the signal accepted() will be emitted upon click on the button. If the button has RejectRole or NoRole, the signal rejected() will be emitted upon click on the button. If a button has a different role, neither accepted() nor rejected() will be emitted. This works for both standard and custom buttons. The signal finished() with result code will be sent regardless of a clicked button role. Also added documentation strings for some methods of private classes in order to have better tooltips in IDE(s). Task-number: QTBUG-44131 Change-Id: I521a4e5112eb4cf168f6fbb4c002dbe119aeeb09 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | QTableView: Fix keyboard navigation with disabled rowsChristian Ehrlicher2018-12-181-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation with MovePageUp/Down and MoveEnd did not honor disabled cells in all cases which lead to inconsistencies in the navigation (esp. since MoveHome does honor them correctly). Therefore make sure that all four move operations work consistent by refactoring the code to use common functions. Fixes: QTBUG-72400 Change-Id: I63fa3b626510d21c66f4f9b2b1bfb3261728ecaf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QbstractItemView: Allow Key_Space for keyboardSearch()Christian Ehrlicher2018-12-251-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard search in QAbstractItemView did not handled Key_Space because this is also an edit trigger. It was also consumed if no edit was started. This patch changes this behavior and triggers the keybaord search when the editing was not started. Fixes: QTBUG-48505 Change-Id: I58e0d283f863c9b12ac5d2f6171f15522bd7c30a Reviewed-by: David Faure <david.faure@kdab.com>
* | | QTreeView: fix keyboard navigation when first or last item is disabledChristian Ehrlicher2018-12-252-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard navigation did not consider the disabled state when trying to find the new index under all circumstances. This lead to a non-working PageUp/Down/Home/End navigation when the first or last item was disabled or hidden. Fix it by explicitly checking if the calculated item is hidden/enabled and skip it in this case. Fixes: QTBUG-44746 Fixes: QTBUG-34832 Change-Id: Ifa3b64a405e67b792db5db9d186d426fcfe183fb Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-151-163/+966
|\| | | | | | | | | | | Change-Id: Iad06d8c07dfc288c9d1a9f7ee3520285cea60546
| * | QAbstractSlider: fix invertedControls having no effect for left/right keysMitch Curtis2018-12-131-3/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a comment in the code that said: // It seems we need to use invertedAppearance for Left and right, otherwise, things look weird. It's not clear what that was referring to, but in its current state, a slider with invertedControls set to true will not behave as expected: pressing the left arrow key will decrease its value instead of increasing it, and vice versa for the right arrow key. As stated in the documentation (and by its name), invertedAppearance only controls the appearance of the slider, and not the effect of key events. Remove the comment and use invertedControls instead. Change-Id: I13296cbda9244413978ef0d7f0856065f74fd0bf Fixes: QTBUG-25988 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Refactor tst_QAbstractSlider::keyPressed()Mitch Curtis2018-12-131-163/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't do several tests at once in the test function. Instead, move the extra tests to the data function. This makes it possible to easily add a self-contained test (i.e row) for an upcoming fix. Task-number: QTBUG-25988 Change-Id: I65c8d7620f01107f8f59c96896b1a641d97f5fdc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-131-37/+36
|\| | | | | | | | | | | Change-Id: I0fe623517af28e408b642c879efd59f633ab63ac
| * | tst_QMessageBox: Modernize and simplify codeVitaly Fanaskov2018-12-121-37/+36
| |/ | | | | | | | | | | | | | | | | | | Changed 0 to nullptr, used more C++-style casts, simplified some code for searching a button, and changed foreach to range-based for loop. Task-number: QTBUG-44131 Change-Id: I211b12751b0e2591d1d14294c31b51d52bb4e3f6 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>