9b8493314d
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
|
||
---|---|---|
.. | ||
subdir | ||
task71021 | ||
Test.framework/Headers | ||
testproject | ||
.gitattributes | ||
.gitignore | ||
assign-namespace.h | ||
backslash-newlines.h | ||
c-comments.h | ||
cstyle-enums.h | ||
cxx11-enums.h | ||
cxx11-explicit-override-control.h | ||
cxx11-final-classes.h | ||
cxx17-namespaces.h | ||
cxx-attributes.h | ||
dir-in-include-path.h | ||
dollars.h | ||
error-on-wrong-notify.h | ||
escapes-in-string-literals.h | ||
extraqualification.h | ||
forgotten-qinterface.h | ||
forward-declared-param.h | ||
function-with-attributes.h | ||
gadgetwithnoenums.h | ||
grand-parent-gadget-class.h | ||
Header | ||
interface-from-framework.h | ||
interface-from-include.h | ||
macro-on-cmdline.h | ||
moc.pro | ||
namespace_no_merge.h | ||
namespace.h | ||
namespaced-flags.h | ||
no-keywords.h | ||
non-gadget-parent-class.h | ||
oldstyle-casts.h | ||
os9-newlines.h | ||
parse-boost.h | ||
parse-defines.h | ||
plugin_metadata.h | ||
pp-dollar-signs.h | ||
pure-virtual-signals.h | ||
qinvokable.h | ||
qprivateslots.h | ||
qtbug-35657-gadget.h | ||
related-metaobjects-in-gadget.h | ||
related-metaobjects-in-namespaces.h | ||
related-metaobjects-name-conflict.h | ||
single_function_keyword.h | ||
single-quote-digit-separator-n3781.h | ||
slots-with-void-template.h | ||
task87883.h | ||
task189996.h | ||
task192552.h | ||
task234909.h | ||
task240368.h | ||
template-gtgt.h | ||
trigraphs.h | ||
tst_moc.cpp | ||
unterminated-function-macro.h | ||
using-namespaces.h | ||
warn-on-multiple-qobject-subclasses.h | ||
warn-on-property-without-read.h | ||
win-newlines.h |