Em Quarta-feira 02 Dezembro 2009, às 10:15:28, ext Uwe Rathmann escreveu:
> Thiago Macieira wrote:
> >> I guess moving QList::toSet() away from QList would solve the problem.
> >
> > That's a feature request for Qt 5, no sooner.
> 
> How this problem can be solved is a different question, but it would be
>  nice to know if the problem has been understood/noted/accepted on your ( =
>  Qt development ) side.

No, it's not accepted as a Qt issue. It has never been accepted as a Qt issue, 
despite the task you mentioned in 4.2/4.3 times.

> I'm not sure why you absolutely don't want to comment the posted code
> snippet or my other questions, but of course I have to accept if you want
> to close the discussion.

I don't see any code snippet sent to the mailing list. Could you repost it? I 
might have missed it.

IIUC, the problem is that:
1) Qwt uses QList<double>
This is fine.

2) Qwt has:
        #ifdef BUILDING_QWT
        template class __declspec(dllexport) QList<double>;
        #endif
This tells the compiler "export all symbols from QList<double>"

3) when compiling Qwt, this error appears:
        qwt_thermo.cpp
        c:\qt\4.6.0-rc1\include\qtcore\../../src/corelib/tools/qhash.h(875) :
        error C2668: 'qHash' : ambiguous call to overloaded function

From what I can tell, this problem is caused by Qwt itself. Because of that 
line on qwt_valuelist.h, it needs to export "QSet<double> 
QList<double>::toSet() const", which involves expanding QSet<double>, which 
requires the qHash(double) function, which doesn't exist.

So my recommendation is to just remove that line from qwt_valuelist.h. I don't 
see why it should be there at all. If you can remember the reason why it was 
introduced in the first place, we can discuss it.

In any case, this is not a Qt issue. It's a compiler mis-feature that is 
triggered by Qwt itself.

-- 
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