qt6-bb10/tests/auto/widgets
Volker Hilsheimer 188d739400 Sync default action when checking tool button programmatically
QAbstractButton::setChecked is not virtual, so QToolButton cannot
override to synchronize the default action's checked state. This resulted
in button and default action not being in sync when the checked state
of the button was changed programmatically, while changing the checked
state on the action kept the button in sync.

Connect to the button's own toggled signal instead to keep the state of
the default action in sync. Make it a unique connection to allow multiple
calls to setDefaultAction, which are used by QToolButton to keep the
button updated if properties of the default action change.

Add a test that confirms that button and action are synchronized both
ways, and that we only get single signal emissions when changing either
programmatically.

Fixes: QTBUG-95255
Pick-to: 6.2 6.1
Change-Id: I0e027faf1da763ef1878e46e85bfa70073c8bf82
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-07-22 16:17:49 +02:00
..
dialogs Fix wrong C-style cast, use correct QTest::keyClick overload 2021-04-28 10:15:29 +02:00
effects Fix tst_qgraphicseffect on Wayland 2021-03-11 08:04:21 +01:00
graphicsview tst_QGraphicsScene: fix compiler warning about misleading indentation 2021-07-17 00:46:01 +02:00
itemviews emit layoutAboutToBeChanged timely 2021-07-20 21:27:27 +01:00
kernel QWidgetAction: add test for defaultWidget() being deleted before action 2021-06-22 11:38:32 +02:00
styles Support pt units for sizes, as documented 2021-07-20 13:20:23 +02:00
util Fix auto completion in QFileDialog on Windows 2021-07-09 00:48:44 +02:00
widgets Sync default action when checking tool button programmatically 2021-07-22 16:17:49 +02:00
CMakeLists.txt Begin port of qtbase to CMake 2018-11-01 11:48:46 +00:00