Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.7.0
-
None
Description
Since https://codereview.qt-project.org/#/c/126105/, the QT_VERSION define is now an expansion of the QT_VERSION_CHECK macro, but moc doesn't process this macro. The result of this is that a signal or slot can no longer have a signature that is conditional by checking QT_VERSION, e.g.
signals: #if QT_VERSION >= 0x050000 void incomingConnection(qintptr descriptor); #else void incomingConnection(int descriptor); #endif
works as expected with Qt < 5.7, but no longer compiles with Qt 5.7 as moc and gcc end up using different signatures.
This is using qmake, on x86_64. I think I have traced this to the fact that x86_64 isn't defined when moc is run, but it is when gcc runs. This means __WORDSIZE gets defined incorrectly and moc tries to include qconfig-32.h instead of qconfig-64.h