--===============1977585849== Content-Type: multipart/signed; boundary="nextPart3452281.If2gm82uU3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart3452281.If2gm82uU3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 22 February 2007, Cyrille Berger wrote: > > > I thought it was obligatory for QHash keys because the dox say "The k= ey > > > type of a QHash must provide operator=3D=3D() and a global qHash(Key) > > > function." > > > > It compiles and works fine without, as far as I can see. > > Qt provides quiet a few usual qHash ;) (and there is one for pointers) Pointers is what we don't want to use in this class. Qt only has qHash meth= ods for any integer type (char, unsigned long, etc.), any pointer type, QChar,= =20 QString, and QByteArray. Just using QHash on KoInputDevices given a compile error. I've added a very stupid & simple qHash function to= =20 KoInputDevice which I'll commit in a moment. /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h: In membe= r function =E2=80=98typename QHash::Node** QHash::findNode(= const Key&, uint*) const [with Key =3D KoInputDevice, T =3D KoID]=E2=80=99: /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:789: in= stantiated from =E2=80=98typename QHash::iterator QHash::fi= nd(const Key&) [with Key =3D KoInputDevice, T =3D KoID]=E2=80=99 /home/kde4/koffice/krita/ui/kis_paintop_box.cc:163: instantiated from here /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:803: erro= r: no matching function for call to =E2=80=98qHash(const KoInputDevice&)=E2= =80=99 /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:40: note:= candidates are: uint qHash(char) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:41: note:= uint qHash(uchar) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:42: note:= uint qHash(signed char) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:43: note:= uint qHash(ushort) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:44: note:= uint qHash(short int) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:45: note:= uint qHash(uint) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:46: note:= uint qHash(int) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:47: note:= uint qHash(ulong) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:55: note:= uint qHash(long int) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:56: note:= uint qHash(quint64) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:64: note:= uint qHash(qint64) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:65: note:= uint qHash(QChar) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:66: note:= uint qHash(const QByteArray&) /home/kde4/kde4/include/kurl.h:1020: note: uint qHash(const= QString&) /home/kde4/kde4/include/kshortcut.h:159: note: uint qHash(c= onst QKeySequence&) /home/kde4/kde4/include/kshortcut.h:154: note: uint qHash(c= onst KShortcut&) /home/kde4/kde4/include/kurl.h:1021: note: uint qHash(const= KUrl&) /home/kde4/qt-copy/include/QtCore/../../src/corelib/kernel/qabstractitemmod= el.h:350: note: uint qHash(const QModelIndex&) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h: In membe= r function =E2=80=98typename QHash::Node** QHash::findNode(= const Key&, uint*) const [with Key =3D KoInputDevice, T =3D QList]=E2=80=99: /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:789: in= stantiated from =E2=80=98typename QHash::iterator QHash::fi= nd(const Key&) [with Key =3D KoInputDevice, T =3D QList]=E2=80=99 /home/kde4/koffice/krita/ui/kis_paintop_box.cc:230: instantiated from here /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:803: erro= r: no matching function for call to =E2=80=98qHash(const KoInputDevice&)=E2= =80=99 /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:40: note:= candidates are: uint qHash(char) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:41: note:= uint qHash(uchar) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:42: note:= uint qHash(signed char) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:43: note:= uint qHash(ushort) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:44: note:= uint qHash(short int) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:45: note:= uint qHash(uint) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:46: note:= uint qHash(int) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:47: note:= uint qHash(ulong) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:55: note:= uint qHash(long int) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:56: note:= uint qHash(quint64) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:64: note:= uint qHash(qint64) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:65: note:= uint qHash(QChar) /home/kde4/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:66: note:= uint qHash(const QByteArray&) /home/kde4/kde4/include/kurl.h:1020: note: uint qHash(const= QString&) /home/kde4/kde4/include/kshortcut.h:159: note: uint qHash(c= onst QKeySequence&) /home/kde4/kde4/include/kshortcut.h:154: note: uint qHash(c= onst KShortcut&) /home/kde4/kde4/include/kurl.h:1021: note: uint qHash(const= KUrl&) /home/kde4/qt-copy/include/QtCore/../../src/corelib/kernel/qabstractitemmod= el.h:350: note: uint qHash(const QModelIndex&) make[2]: *** [krita/ui/CMakeFiles/kritaui.dir/kis_paintop_box.o] Error 1 make[1]: *** [krita/ui/CMakeFiles/kritaui.dir/all] Error 2 =2D-=20 Boudewijn Rempt=20 http://www.valdyas.org/fading/index.cgi --nextPart3452281.If2gm82uU3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBF3WvedaCcgCmN5d8RAgK3AKDjr2GRfhe5Ab7+EsWZYox51qGatQCgnP14 eN399StzJiM/+bzJfiT7lEs= =LCqU -----END PGP SIGNATURE----- --nextPart3452281.If2gm82uU3-- --===============1977585849== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --===============1977585849==--