msvc: qHash
David Faure
faure at kde.org
Thu May 11 00:00:22 CEST 2006
On Wednesday 10 May 2006 22:29, Peter Kümmel wrote:
> msvc could not match a function for qHash and needs a explicit
> definition:
>
> Index: kdecore/ksortablevaluelist.h
> ===================================================================
> --- kdecore/ksortablevaluelist.h (Revision 538865)
> +++ kdecore/ksortablevaluelist.h (Arbeitskopie)
> @@ -168,4 +168,10 @@
> // {
> // };
>
> +
> +#ifdef Q_CC_MSVC
> +template<class U, class V>
> +inline uint qHash(const KSortableItem<U,V>& key) { return uint(&key); }
> +#endif
> +
> #endif // KSORTABLEVALUELIST_H
>
>
> Could I apply this patch? Or is there a standard way of handling this?
I'm confused. This file doesn't use QHash/QSet at all, so why is a QHash implementation needed?
Is it due to some other file hashing KSortableItems?
In fact I'm wondering if we really need KSortable[Value]List with Qt4, when it's easy
to just pass a function to qSort(foo.begin(),foo.end(),mySortingFunctionHere)....
or to use a map, for something closer to the usage of KSortableValueList.
I'll start with porting the code I maintain away from KSortableValueList ;)
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the Kde-buildsystem
mailing list