[Interest] Queued signals lost in 5.15.0 (works in 5.12.5) (Windows)

Alexander Dyagilev alervdvcw at gmail.com
Sat Sep 26 16:53:23 CEST 2020


I use this helper macro for this (register a metatype in runtime):

template <class T>
inline void qRegisterMyMetaType(const char *name)
{
     if (QMetaType::type(name) == QMetaType::UnknownType)
         qRegisterMetaType<T>(name);
}

#define Q_REGISTER_MY_METATYPE(type) qRegisterMyMetaType<type>(#type);


Usage example:

Q_REGISTER_MY_METATYPE(QCryptographicHash::Algorithm);

:)


On 9/26/2020 5:48 PM, Alexander Dyagilev wrote:
>
> I'm not sure what you mean exactly, but I've seen many such situations 
> (when connection did not work because metatype was not registered) and 
> never saw any warnings anywhere.
>
> On 9/26/2020 12:02 PM, Giuseppe D'Angelo via Interest wrote:
>> Il 26/09/20 07:55, Alexander Dyagilev ha scritto:
>>> Yeah, it's possible that some metatype (used in signal) is 
>>> registered in
>>> Qt 5.12 and is NOT registered in Qt 5.15, thus connection does not work
>>> between objects in different threads.
>>>
>>> It's required to register it manually then.
>>
>> Do you know of a case where this wouldn't spit the usual "arguments 
>> are not registered" warning? (If so, that's a bug)
>>
>> Thanks,
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200926/2d96a784/attachment.html>


More information about the Interest mailing list