PDA

View Full Version : Warnings: qRegisterMetaType<QList<QPointer<QObject> > >("QList<QPointer<QObject> >")



JPNaude
27th September 2013, 06:09
Hi

I'm trying to register QList<QPointer<QObject> > in the meta object system like this:



qRegisterMetaType<QList<QPointer<QObject> > >("QList<QPointer<QObject> >");


It works, but I get a bunch of warnings using MSVC2012:



D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(886) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(886) : while compiling class template member function 'int QMetaTypeId_QPointer_QObjectStar<T>::qt_metatype_id(void)'
with
[
T=QObject
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(532) : see reference to function template instantiation 'int QMetaTypeId_QPointer_QObjectStar<T>::qt_metatype_id(void)' being compiled
with
[
T=QObject
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(886) : see reference to class template instantiation 'QMetaTypeId_QPointer_QObjectStar<T>' being compiled
with
[
T=QObject
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(531) : see reference to class template instantiation 'QMetaTypeId<T>' being compiled
with
[
T=QPointer<QObject>
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(871) : see reference to class template instantiation 'QMetaTypeId2<T>' being compiled
with
[
T=QPointer<QObject>
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(531) : see reference to class template instantiation 'QMetaTypeId<T>' being compiled
with
[
T=QList<QPointer<QObject>>
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(639) : see reference to class template instantiation 'QMetaTypeId2<T>' being compiled
with
[
T=QList<QPointer<QObject>>
]
D:\tools\qt\Qt5.1.0\5.1.0\msvc2012_64\include\QtCo re/qmetatype.h(646) : see reference to function template instantiation 'int qMetaTypeId<T>(void)' being compiled
with
[
T=QList<QPointer<QObject>>
]
..\..\build_files\tmp\moc_MyClass.cpp(324) : see reference to function template instantiation 'int qRegisterMetaType<QList<T>>(void)' being compiled
with
[
T=QPointer<QObject>
]


Is this linked to the way I register it, or is it something wrong in qmetatype.h? In either case, how can I get rid of it?

Thanks,
Jaco