[Interest] New QObject::connect syntax should be avoided??

Thiago Macieira thiago.macieira at intel.com
Sat Jul 14 02:16:17 CEST 2018

On Friday, 13 July 2018 04:57:10 PDT Jean-Michaƫl Celerier wrote:
> Using clang 6.0.1 and Qt 5.11.1 :
>     clang++ -O3 -flto /tmp/main.cpp -fPIE -I/usr/include/qt/
> -I/usr/include/qt/QtCore -I/usr/include/qt/QtWidgets
> -I/usr/include/qt/QtGui -lQt5Widgets -lQt5Core
> I did not have the problem in the bug report. Are you using a static Qt
> maybe ?

Note that you need to make certain use of the PMF for the problem to trigger. 
It's not always the case that all LTO builds will cause problems.

Also note that the above should not compile. Qt has a check in qglobal.h 
against use of -fPIE and will #error out, asking you to use -fPIC. It's this 
exact issue that it's protecting against.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Interest mailing list