Priority: P1: Critical
Affects Version/s: 6.0.0
Component/s: Build tools: uic
Commits:98a89fb711a15fcf9f541f7b4a8ae7492e5a445c (qt/qtbase/dev) e0fecdc7bc7b3dbd6a6f9046d43450b3bdd38a60 (qt/qtbase/6.0)
Since Qt 6, uic has started producing invalid connection statements when the signal or slot has overloads.
To reproduce (how the attached example was produced):
1. Create a "Qt Widgets" application using the template in Qt Creator
2. Go to the form editor and add a vertical slider to the form
3. Enter signal/slot editing mode and create a connection from slider to widget parent
4. Make sure "inherited from QWidget" is checked, then pick "valueChanged(int)" on the slider and "repaint()" on the widget.
5. Try to compile.
With Qt 5.15 it produces the following code:
Which works fine.
But with Qt 6 uic produces the following code:
This fails to compile, because QWidget::repaint is ambiguous:
In this case, I think qOverload() is needed to disambiguate the slot.
|For Gerrit Dashboard: QTBUG-90308|
|330196,9||Hardcode a special case of using qOverload for slots without arguments||dev||qt/qtbase||Status: MERGED||+2||0|
|330351,2||Hardcode a special case of using qOverload for slots without arguments||6.0||qt/qtbase||Status: MERGED||+2||0|