Em Quarta-feira 02 Dezembro 2009, às 17:44:05, ext Uwe Rathmann escreveu:
> Anyway, here it is:
>
> Jordi Pujol wrote:
> | struct foo
> | {
> | int m_IntValue;
> | double 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 ( ... )
>
> I'm sure you agree, that implementing pointless qHash() methods isn't what
> you want to do when using QList.
Indeed, but you forgot Michael's reply:
"FYI: I just tried it in VS 2008, SP1, which doesn't complain."
I'm pretty sure the problem is the exporting of QList<struct foo>, not its
simple use.
> > In any case, this is not a Qt issue. It's a compiler mis-feature that is
> > triggered by Qwt itself.
>
> I agree, that the compiler is to blame, but all what Qwt can avoid is to
> instantiate/export a QList - but Qt can avoid, that an instantiation of
> QList requires an implementation of all, what is required to instantiate a
> QSet.
>
> One question remains: what makes the problem happen with Qt 4.1, 4.2 and
> 4.6 but not for Qt 4.3-4.5. But this might be a mystery of the compiler
> implementation.
My guess is that you trip this error due to the #include order. Those change
unpredictably.
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Development Frameworks
Sandakerveien 116, NO-0402 Oslo, Norway
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
