Q_DECLARE_METATYPE results in assert failure after upgrading from Qt 4.8 > 5.15
Solved
General and Desktop
-
I have a large file which uses these macros:
Q_DECLARE_METATYPE(boost::function<void()>); Q_DECLARE_METATYPE(boost::function<void(const QPoint&)>);
But sadly after upgrading from Qt 4.8 to 5.15 I am getting the error:
ASSERT failure in qRegisterNormalizedMetaType: "qRegisterNormalizedMetaType was called with a not normalized type name, please call qRegisterMetaType instead.", file X:\redacted\vcpkg_installed\x86-windows\x86-windows\include\qt5\QtCore\qmetatype.h, line 1855
I have tried to debug this for hours upon hours even went through a rabbit hole searching for a fix to this issue but all the people who have had it have different cases which resolve it.
How should I call qRegisterMetaType like it is telling me to? I cannot find any macros, I tried to include QMetaType.h and then call it in my constructor for my large file but that did not fix it either please someone help me I cannot figure this out
-