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

Thiago Macieira thiago.macieira at intel.com
Sat Jan 5 03:12:48 CET 2013


On sábado, 5 de janeiro de 2013 00.50.45, Jan Kundrát wrote:
> On Wednesday, 2 January 2013 21:04:13 CEST, Stephen Kelly wrote:
> > So unless you're deliberately creating a typedef registration (and even in
> > that case, be careful), omit the string and you don't have to
> > think about it
> > anymore.
> 
> Looks like I cannot register a pointer to a namespaced class through that
> overload.
> 
> I've tried these:
> 
> - qRegisterMetatype<NS::Class*>();
> - using namespace NS; qRegisterMetaType<Class*>();
> - namespace NS { void reg() { qRegisterMetaType<Class*>(); } } NS::reg();
> - typedef NS::Class Class; qRegisterMetaType<Class*>();

Why don't they work?

> 
> None of them work, though. The only one which works for me is this one:
> 
> - qRegisterMetaType<NS::Class*>("Class*");

This one looks wrong. It's missing the namespace name.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130105/f75ab460/attachment.sig>


More information about the Interest mailing list