References to __declspec(dllimport) is not a constant expression on
Windows, so we can't have a direct reference to a staticMetaObject.
Commit 9b8493314d fixed the Q_OBJECT parent
link (added in 5.14, kicked in for 6.0 with the ABI break), but commit
656d6f2a9b added links for Q_GADGETs too
without taking the need for Windows DLLs into account.
This change is a no-op everywhere but Windows. On Windows, since we
store the pointer to the indirect getter function, now you may get non-
null pointers from QMetaObject::superClass().
Pick-to: 6.4
Change-Id: I6d3880c7d99d4fc494c8fffd16fab51aa255106e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>