Compile error with QT_STRICT_ITERATORS

Thiago Macieira thiago at
Sun Oct 19 15:35:01 BST 2008

Thiago Macieira wrote:
>Christian Ehrlicher wrote:
>>This code doesn't compile - neither with msvc nor with gcc 3.4.5
>> (mingw):
>>#include <QtCore/QHash>
>>int main(int, char**)
>>   QMultiHash<QString,QString> myHash;
>>   myHash.remove("blub", "blub");
>>   return 0;
>>Looks like a qt-bug to me or do I miss something?
>There's no QHash::remove(const Key &, const T &);
>There's only a one-argument QHash::remove.

Wait, QMultiHash. I missed that.

I see the function there.

But it fails to compile:
/tmp/multihash/main.cpp:7:   instantiated from here
src/corelib/tools/qhash.h:336: error: 'bool QHash<Key, 
T>::iterator::operator!=(const QHash<Key, T>::const_iterator&) const [with 
Key = QString, T = QString]' is private
src/troll/qt-4.5/src/corelib/tools/qhash.h:955: error: within this context

Bug in Qt.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list