The code generated by uic
tool adds QObject::connectSlotsByName()
, see https://doc.qt.io/qt-5/qmetaobject.html#connectSlotsByName for more information. This can be confirmed with grep connectSlotsByName src/qt/forms/ui*
After #13529 it makes sense to also drop connectSlotsByName
usage following the same reasoning - these connections are now in compile time checked.
Also, starting from https://github.com/qt/qtbase/commit/6301d5e51b0c56d09b0bd1cb63f4908c3f8e2c70#diff-d720bd2a996f09262e267c4917e4cc86it is possible to pass --no-autoconnection
or -a
, but this will take longer since it’s only available in recent Qt.
For reference:
0--- a/src/Makefile.qt.include
1+++ b/src/Makefile.qt.include
2@@ -355,7 +355,7 @@ bitcoin_qt : qt/bitcoin-qt$(EXEEXT)
3 ui_%.h: %.ui [@test](/bitcoin-bitcoin/contributor/test/) -f $(UIC)
4 @$(MKDIR_P) $(@D)
5- $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -o $@ $< || (echo "Error creating $@"; false)
6+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -a -o $@ $< || (echo "Error creating $@"; false)
7
8 %.moc: %.cpp
9 $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(DEFAULT_INCLUDES) $(QT_INCLUDES) $(MOC_DEFS) $< | \
Review with QT_FATAL_WARNINGS=1
.