summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QSpinBox: add new signal textChanged(QString)Christian Ehrlicher2019-03-011-3/+3
| | | | | | | | | | | | | Add a new signal textChanged(QString) as a replacement for valueChanged(QString) so valueChanged(QString) can be removed with Qt6. This removes the ambiguous valueChanged() signal and also matches the 'text' property naming. Change-Id: I0676a7112f70add20a3a7ef9381268cd9b8a5851 Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-012-0/+100
|\ | | | | | | Change-Id: Icec0aa703d8a13efa9f1634a1a353eb9d63685c8
| * 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 "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Liang Qi2019-02-233-2/+18
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-223-2/+18
| |\| | | | | | | | | | | | | | Change-Id: I4b56ce8c76729d9fc60995564299f8f27336fcde
| | * | 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>
* | | | QGraphicsItemAnimation: add transformAt() an deprecate matrixAt()Christian Ehrlicher2019-02-231-3/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | Replace QGraphicsItemAnimation::matrixAt(qreal) with transformAt(qreal) to avoid the usage of QMatrix which is deprecated. Change-Id: Iafcdf8b9b2fbffffa61417601a3ae4272d0176c6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | ensure signal subWindowActivated() triggers even when widget has focusMartin Koller2019-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A widget being added to QMdiArea which currently has focus did not trigger the subWindowActivated() signal since the connection to the method _q_processWindowStateChanged, which emits the signal (set up in appendChild()), was just done after the focus was set back again to the added widget. Setting the focus makes the widget active. This patch changes the order: first call appendChild(), then set focus Change-Id: I3aaf1728dc082d1323c7fbd62bfdbd2af87ab2ce Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-2027-245/+285
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp Added tests/auto/testlib/selftests/expected_crashes_5.txt to work round the output of the crashes test (which exercises UB, see QTBUG-73903) being truncated on one test platform. Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
| * | 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>
* | | QLineEdit: don't emit editingFinished if nothing was doneSamuel Gaist2019-02-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a modal dialog is called from a slot connected to the editingFinished signal, the chain of events resulting from the focus returning to this widget will make the editingFinished signal emitted again. This patch uses a new variable to keep track of the fact that there was a modification. Once editingFinished was emitted, that flag is cleared so next time the signal will be emitted again only if a modification was made to the line edit content. [ChangeLog][QtWidget][QLineEdit] Behavior change: now the editingFinished signal is emitted only once after the line edit content was edited. Fixes: QTBUG-40 Change-Id: Ia4760bad8717f1758c3939132c446b4b4c6cd498 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | tst_qheaderview: Do not use the deprecated QAbstractItemModel::reset()Albert Astals Cid2019-02-111-2/+4
|/ / | | | | | | | | | | | | | | | | Still do a begin/end reset model in place, which is probably not the best code but since it's a test and it works it should be enough Change-Id: Iffaf8d69d5be64ef5e1e359e3d90a1e8174fc13b Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@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