From kde-core-devel Tue Jul 08 13:01:55 2008 From: "Roland Harnau" Date: Tue, 08 Jul 2008 13:01:55 +0000 To: kde-core-devel Subject: Re: KDE/kdelibs/kdecore Message-Id: <476f836a0807080601j3a796c2arf30059a73bdfd0c8 () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=121552217416012 2008/7/8, Thiago Macieira : > Andreas Pakulat wrote: >>I'm not sure why the const_this is needed here anyway, shouldn't a >> simple const_iterator and ::constEnd() be sufficient too? > > It's needed because of the missing constFind() function. const_iterator QHash::constFind ( const Key & key ) const does exist, at least in Qt's API reference. I think it really improves readability if the const versions (constBegin(), constEnd(), constFind()) are used without the need to rely on subtle rules for resolving overloaded methods. Roland