qt5base-lts/tests/auto/corelib/kernel
Thiago Macieira 9b8493314d Qt6: Fix uninitialized meta objects on Windows
Windows has a problem relating to cross-DLL variable relocations: they
are not supported. Since QMetaObject's link to the parent class is done
via a pointer, every QMetaObject in a DLL or in the EXE that derives
from a class from another DLL (such as QObject) will be dynamically
initialized.

This commit changes the meta object pointers in QMetaObject::d from raw
pointers to a wrapper class SuperData, which is almost entirely source-
compatible with the pointer itself. On all systems except for Windows
with Qt 6, it's binary compatible with the current implementation.

But for Windows with Qt 6, this commit will store both the raw pointer
and a pointer to a function that returns the QMetaObject, with one of
them non-null only. For all meta objects constructed by moc, we store
the function pointer, which allows the staticMetaObject to be statically
intialized. For dynamic meta objects (QMetaObjectBuilder, QtDBus, QtQml,
ActiveQt), we'll store the actual raw pointer.

[ChangeLog][QtCore][QMetaObject] Some internal members of the
QMetaObject class have changed types. Those members are not public API
and thus should not cause source incompatibilities.

The macro QT_NO_DATA_RELOCATION existed in Qt 4 but was called
Q_NO_DATA_RELOCATION and only applied to Symbian. It was removed in
commit 24a72c4efa ("qglobal: Remove
symbian specific features").

Task-number: QTBUG-38876
Fixes: QTBUG-69963
Change-Id: Id92f4a61915b49ddaee6fffd14ae1cf615525e92
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-16 18:34:41 -07:00
..
qcoreapplication Port from QAtomic::load() to loadRelaxed() 2019-06-20 20:48:59 +02:00
qdeadlinetimer Fix integer overflows in QDeadlineTimer 2019-05-08 17:19:44 +00:00
qelapsedtimer unblacklist passing tests 2019-07-08 11:01:42 +00:00
qeventdispatcher unblacklist passing tests 2019-07-08 11:01:42 +00:00
qeventloop unblacklist passing tests 2019-07-08 11:01:42 +00:00
qmath Be (somewhat more) consistent about the value of pi 2017-06-20 09:53:46 +00:00
qmetaenum QMetaEnum: fix UB 2018-10-17 08:48:13 +00:00
qmetamethod Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
qmetaobject Remove usages of deprecated APIs of corelib 2019-07-05 11:25:46 +02:00
qmetaobjectbuilder Qt6: Fix uninitialized meta objects on Windows 2019-07-16 18:34:41 -07:00
qmetaproperty Remove QLatin1Literal usages 2019-06-10 16:50:31 +00:00
qmetatype Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
qmimedata Updated license headers 2016-01-21 18:55:18 +00:00
qobject tst_QObbject: Fix very annoying -Wdeprecated-copy warnings 2019-07-12 06:55:45 +02:00
qpointer Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-04 08:59:18 +02:00
qsharedmemory Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
qsignalblocker Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
qsignalmapper Updated license headers 2016-01-21 18:55:18 +00:00
qsocketnotifier unblacklist passing tests 2019-07-08 11:01:42 +00:00
qsystemsemaphore tst_qsystemsemaphore: Use qt_test_helper functionality 2018-07-31 05:27:08 +00:00
qtimer unblacklist passing tests 2019-07-08 11:01:42 +00:00
qtranslator Port from QAtomic::load() to loadRelaxed() 2019-06-20 20:48:59 +02:00
qvariant Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
qwineventnotifier Merge remote-tracking branch 'origin/5.11' into dev 2018-03-28 08:12:21 +02:00
kernel.pro Make tests compile for Android 2018-06-25 08:01:19 +00:00