[Interest] Re: qRegisterMetaType<QList<QSslError> > and type flags

Jan Kundrát jkt at flaska.net
Wed Jan 2 18:12:51 CET 2013


On Wednesday, 2 January 2013 17:42:53 CEST, Stephen Kelly wrote:
> The fix is probably to include qsslsocket.h in the translation 
> unit where you 
> have that line. 
>
> Of course it's a bug and an odd mistake that 
> Q_DECLARE_METATYPE(QList<QSslError>) is in qsslsocket.h instead of 
> qsslerror.h.

Hi Stephen, thanks for your answer. Adding Q_DECLARE_METATYPE(QList<QSslError>) to my code fixed the problem as well (as suggested by Thiago on IRC). Looks like there will be some discussion on development@ about whether the assert is the right thing in there.

> Also you should just use 
>
>  qRegisterMetaType<QList<QSslError> >() 
>
> without the string.

The 4.x docs [1] uses the variant with a string. Does your suggestion apply to Qt 4.x (4.6+ in my case, to be specific) as well? Shall the docs be changed? Is there any harm in using the string in Qt5?

With kind regards,
Jan

[1] http://doc.qt.digia.com/qt/qmetatype.html#qRegisterMetaType

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/



More information about the Interest mailing list