qt6-bb10/tests/auto/widgets/widgets
Marc Mutz a7da8e0dab QWidget: cope with QObject::connect()'s incomplete SFINAE-friendliness
The plan for QObject::connect() (perfect) forwarders, such as
QWidget::addAction(), was to just use a variant of the Detection Idiom
to see whether QObject::connect() with the arguments as given would
compile and SFINAE out the forwarder otherwise.

It turns out that the "functor" overload of QObject::connect(), in
particular, is severly underconstrained and accepts e.g. QKeySequence
as a function object, only erroring out via a static_assert() in the
body of the function, and thus at instantiation time and not, as
needed, at overload resolution time.

At the same time, we don't really want QObject::connect() to SFINAE
out on argument mismatches between signal and slot, because the
resulting error messages would be ... unkind to users of the API. We
would like to keep the static_assert()s for easier error reporting.

Reconciling these two contradicting requirements has so far eluded
this author, so for now, to unblock progress, we explicitly black-
and, in one case, white-list possible arguments. Because QKeySequence,
in particular, is implicitly constructible from int(!), and therefore
any enum type(!), incl. Qt::ConnectionType, we need to do way too much
coding in the addAction() constraints. Hopefully, we'll be able to fix
the issue at the root cause, in QObject, before Qt 6.3 is out, but
until then, this is an ok-ish stop-gap measure.

Add thorough overload set checks (positive ones only, for now) to
tst_qwidget and tst_qmenu.

Change-Id: Ia05233df818bc82ecc924fc44c1b349af41cbbf1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-07-24 00:33:09 +02:00
..
qabstractbutton Android: unblock passing tests 2021-04-27 21:12:50 +03:00
qabstractscrollarea Remove the qmake project files 2021-01-07 15:32:28 +01:00
qabstractslider Remove the qmake project files 2021-01-07 15:32:28 +01:00
qabstractspinbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbuttongroup Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcalendarwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcheckbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcombobox tst_QComboBox: fix -Wsuggest-override 2021-07-18 13:48:45 +02:00
qcommandlinkbutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdatetimeedit Use UTC when parsing only a date or only a time, not a date-time 2021-06-23 14:04:08 +02:00
qdial QDial: use qRound to round 2021-03-18 22:34:13 +01:00
qdialogbuttonbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdockwidget Skip tst_QDockWidget::restoreDockWidget on Wayland 2021-03-16 08:08:43 +01:00
qdoublespinbox Add the "Territory" enumerated type for QLocale 2021-04-15 20:17:49 +08:00
qfocusframe Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfontcombobox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qframe Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qgroupbox Android: unblock passing tests 2021-04-27 21:12:50 +03:00
qkeysequenceedit Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlabel Replace QTextDocumentResourceProvider with a std::function 2021-03-30 08:11:27 +02:00
qlcdnumber Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlineedit Fix placement of placeholder text in QLineEdits with action icons 2021-07-06 23:09:51 +02:00
qmainwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmdiarea QMdiArea: Fix top level window title when using DontMaximizeSubWindowOnActivation 2021-05-06 13:08:14 +02:00
qmdisubwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmenu QWidget: cope with QObject::connect()'s incomplete SFINAE-friendliness 2021-07-24 00:33:09 +02:00
qmenubar Fix some warnings 2021-03-31 10:51:50 +02:00
qopenglwidget Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qplaintextedit QPlainTextEdit: adjust scroll bars when showing up 2021-02-09 20:00:59 +08:00
qprogressbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qpushbutton Android: unblock passing tests 2021-04-27 21:12:50 +03:00
qradiobutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscrollarea Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscrollbar Fix wrong variable initialization in tst_QScrollBar::task_209492 2021-05-26 03:14:52 +02:00
qsizegrip Remove the qmake project files 2021-01-07 15:32:28 +01:00
qslider Remove the qmake project files 2021-01-07 15:32:28 +01:00
qspinbox Add the "Territory" enumerated type for QLocale 2021-04-15 20:17:49 +08:00
qsplashscreen Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsplitter Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstackedwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstatusbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtabbar Fix scrolling of tab bar when the visible tab is wider than the visible space 2021-06-09 18:19:15 +02:00
qtabwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextbrowser Android: Add select and copy capability to read-only text widgets 2021-03-30 10:35:59 +02:00
qtextedit Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtoolbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtoolbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtoolbutton Sync default action when checking tool button programmatically 2021-07-22 16:17:49 +02:00
CMakeLists.txt Android: exclude tests crashing at start 2020-11-16 13:35:44 +02:00