Em Segunda-feira 30 Novembro 2009, às 14:54:22, ext Michael Sué escreveu:
> Hi,
> 
> 
> struct foo
> {
>   int m_IntValue;
>   doble m_Double;
> };
> QList<struct foo> StructList;
> 
> And try to compile it with VC++. It complains about qHash(foo) does not
> fit with any of the overloaded uint qHash ( ... )
> <<<
> 
> FYI: I just tried it in VS 2008, SP1, which doesn't complain.

The Visual Studio compiler is very broken when it comes to template 
instantiations, but only for exported types.

See qvector.h:
/*
   ### Qt 5:
   ### This needs to be removed for next releases of Qt. It is a workaround 
for vc++ because
   ### Qt exports QPolygon and QPolygonF that inherit QVector<QPoint> and
   ### QVector<QPointF> respectively.
*/

#ifdef Q_CC_MSVC
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtCore/QPointF>
#include <QtCore/QPoint>
QT_END_INCLUDE_NAMESPACE

This issue here is because QVector<QPoint> is exported indirectly because 
QPolygon is exported. Since this is Qt's issue, Qt works around it.

However, the only use of QList<double> in the entire Qt source code is in 
QtDBus, registering that as a metatype. We definitely do not export 
QList<double> template instantiations anywhere in Qt code.

Therefore, there is nothing we can do about this. The line in qwt_valuelist.h 
seems wrong to me.

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Development Frameworks
     Sandakerveien 116, NO-0402 Oslo, Norway

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to