Olivier Goffart wrote:

>> The Qwt code is completely uninterested in hashing (or sorting) of
>> doubles. It only uses a simple QList<double> to store doubles for its
>> values.
> 
> QList does not need any qHash function.

Nobody needs qHash in the given scenario - beside the compiler. That's
exactly the problem.

>> After reporting the bug to the TrollTech support the
>> problem was gone in Qt 4.3. Seems like this ( or a similar ) problem has
>> been reintroduced in Qt 4.6.
> 
> Which problem are you talking about here?

Compiler errors about the missing qHash(double) implementation ( see the
first mail in this thread ).

> What is QTL?  

Qt Template Library ( in opposite to STL ). 

> What are Lists that are not sorted, do you mean 
> QSet<double>? Would be interesting to know what is instantiating that
> code.

Most containers (including QList) can be sorted by qSort(). The
implementation is inlined in the Qt headers as well and I would expect that
the qSort template is instantiated in 4.6 by accident from a QList<double>
declaration. ( If you explicitely call qSort of a QList<double> it's
obvious, that you need an implementation of qHash(double) ).

Uwe

See also:
http://www.qtcentre.org/forum/f-qwt-23/t-qhashdouble-problem-with-qt-46-tp1-24721.html
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to