Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.13.1
-
None
Description
Hi
I know it's rather a corner case, but my project requires to callQMetaType::registerConverterFunction, ie. allow to register conversion functions with metatype ids rather than C++ types. My project uses an abstraction layer, everything is rather generic and dynamic, and compile-time types are not known when I need to register my conversion functions.
So far I've been able to use it, because an internal workaround makes it public with my compiler (MSVC), but of course it fails to compile in other environments, and won't compile anymore with Qt6.
I don't see any strong reason to hide it, except maybe the inability to perform a compile-time check that both types are not built-in Qt types, like template functions on top of it do, but this could easily be done with a cheap runtime check such as "type >= QMetaType::User".
Let me know what you think.
Thanks.