Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.1, 6.5.2
-
4368179c3 (dev), 7efe78bb5 (6.6), 9eb6c8e48 (6.5)
Description
QTimer where a signal/slot connection with the old syntax of QObject::connect is used and the function signature has a blank between the function name and the opening brackets. Slots will not be called in Qt6.5.1. But before Qt 6.4.3,There is no bug. We can prove that by the code below:
class MyObject : public QObject { Q_OBJECT signals: void mySignalb (); public slots: void mySlotb () { qDebug() << "test B"; } }; int main(int argc, char *argv[]) { QCoreApplication app (argc,argv); MyObject ob; QObject::connect (&ob, SIGNAL (mySignalb ()), &ob, SLOT (mySlotb ())); QTimer::singleShot (0, &ob, SLOT(mySlotb ())); emit ob.mySignalb (); return app.exec (); }
output of this code
A: QMetaObject::invokeMethod: No such method MyObject::mySlotb () test B B: test B test B
- A is the output of Qt 6.5.1
- B is the output of Qt 6.4.3