Qt 3.3 regression: QValueList< QGuardedPtr<QObject> >::findIndex( QObject * ) fails

Ingo Klöcker kloecker at kde.org
Sat Dec 27 15:17:11 GMT 2003


Hi,

if you compile the attached program against Qt 3.2 then you'll get
  Index of 'two' in the list is 1.

But if you compile it against Qt 3.3 then you'll get
  'two' not found in the list.

The reason for this is the changed implementation of 
QGuardedPtr::operator==. I simply copied the Qt 3.3 qguardedptr.h into 
the program and commented the #include <qguardedptr.h> to verify this 
(I'm still using libqt-mt.so.3.2.3 FWIW.).

This regression breaks KMail in quite a few places because we rely on 
the old behavior, e.g. we look for certain KMFolder* in 
QValueList<QGuardedPtr<KMFolder>>. I would be quite surprised if KMail 
would be the only application which will break because of this change.

Please revert the change for Qt 3.3.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qvaluelistqguardedptr.cpp
Type: text/x-c++src
Size: 555 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031227/ca62eb04/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031227/ca62eb04/attachment.sig>


More information about the kde-core-devel mailing list