KServiceFactory question

David Faure faure at kde.org
Mon Dec 5 07:57:33 GMT 2005


On Monday 05 December 2005 06:54, Thomas Braxton wrote:
> in kdelibs/kio/kio/kservicefactory.cpp:207, I found this
> 
> KService::List KServiceFactory::allServices()
> {
>    KService::List result;
>    const KSycocaEntry::List list = allEntries();
>    KSycocaEntry::List::const_iterator it = list.begin();
>    const KSycocaEntry::List::const_iterator end = list.begin();
>    for( ; it != end; ++it )                               ^^^^^^^^^^
> 
> shouldn't end = list.end()? it doesn't seem like the loop will execute 
> correctly as it is.
> is this intentional, or is it a typo?

That's a copy-n-paste error from me; fixed (and unit test added), thanks.

-- 
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-core-devel mailing list