qt6-bb10/tests/auto/tools
Axel Spoerl 2ec2c54e05 uic: use qOverload for ambiguous slots
qOverload was used only for ambiguous signals and slots with no
arguments. Connections to ambiguous slots made in widget designer's
signal/slot editor, lead to an unresolved ambiguity when compiling
the generated code in ui_xxx.h. One example is QLabel::setNum(), which
can either take a double or an int.

Always using qOverload is not an alternative, because signatures are
normalised. E.g. const QString & / QString can't be distinguished.

Add a map with all ambiguous signals and slots to customwidgetsinfo.cpp.
Hardcode the map, because uic lives in QtCore and can't access meta
objects of gui/widget classes.

Use this map in isAmbiguousSignal() and add isAmbiguousSlot().

Change OverloadUse enum into an enum class in language.cpp. Change
enum values to reflect the new condition for slots to use qOverload.

Rename existing enum values and remove default argument in
language::formatMemberFnPtr() to improve code readability.
Apply const T& syntax for all types starting with Q, except QSize and
QPoint.

Revert 94c16517b3, which was a hack
forcing for QLCDNumber::display() to a string based connection.

Add a new baseline to tst_uic, to test the above.

Fixes: QTBUG-93413
Task-number: QTBUG-124241
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I49ccc1688cfc08970cce3e56adf18e5ac49a77e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-04-12 12:32:16 +00:00
..
macdeployqt Change license for tests files 2024-02-04 09:56:42 +01:00
moc Long live QT_TECH_PREVIEW_API 2024-02-20 05:01:09 +01:00
qdbuscpp2xml Change license for tests files 2024-02-04 09:56:42 +01:00
qdbusxml2cpp Change license for tests files 2024-02-04 09:56:42 +01:00
qmake Change license for tests files 2024-02-04 09:56:42 +01:00
qmakelib Change license for tests files 2024-02-04 09:56:42 +01:00
qt_cmake_create Change license for tests files 2024-02-04 09:56:42 +01:00
rcc Add support for using an inline namespaces for -qtnamespace 2024-04-03 17:17:11 +02:00
uic uic: use qOverload for ambiguous slots 2024-04-12 12:32:16 +00:00
windeployqt Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt tests/tools: only run qdbus{cpp2xml,xml2cpp} tests if D-Bus is available 2023-08-14 20:19:36 -07:00