Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
The QTestEvent hierarchy is a collection of all-inline classes which change number and layout depending on whether QT_GUI_LIB and/or QT_WIDGETS_LIB is defined. As a polymorphic class hierarchy with all-inline members, it will create duplicated vtables and fall prey to Clang's -Wweak-vtable, recently added to our headersclean check.
We've silenced the Clang warning for now by using a bug in Clang which makes it not emit the warning when making the dtor = default (even though the dtor will still be inline and produce weak vtables), but we need to fix this properly, esp. since it's also an ODR violation to change the vtable layout between TUs.
The proper way to deal with this would be to offload all the Gui- and Widgets-related parts of QtTest (which itself only links to QtCore) into QtTestGui, QtTestWidgets libraries. QTestLib isn't under BC constraints, so this could even happen before Qt 7.
Attachments
Issue Links
- is cloned by
-
QTBUG-125115 QFutureInterface duplicate vtables
- Open
- relates to
-
QTBUG-69413 QTestLib Changes in Qt
- Open