KDE/kdelibs/kdecore

Olivier Goffart ogoffart at kde.org
Sun Oct 19 15:25:35 BST 2008


Le dimanche 19 octobre 2008, Christian Ehrlicher a écrit :
> Albert Astals Cid schrieb:
> > A Diumenge 19 Octubre 2008, Christian Ehrlicher va escriure:
> >> SVN commit 873369 by chehrlic:
> >>
> >> compile with -DQT_STRICT_ITERATORS
> >>
> >>  M  +28 -28    kconfig_compiler/kconfig_compiler.cpp
> >>  M  +3 -3      kde-config.cpp
> >>
> >>
> >> --- trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp
> >> #873368:873369 @@ -451,7 +451,7 @@
> >>        cpp << "  QStringList default" << name << ";" << endl;
> >>        const QStringList defaults = defaultValue.split( ',' );
> >>        QStringList::ConstIterator it;
> >> -      for( it = defaults.begin(); it != defaults.end(); ++it ) {
> >> +      for( it = defaults.constBegin(); it != defaults.constEnd(); ++it
> >> ) { cpp << "  default" << name << ".append( QString::fromUtf8( \"" <<
> >> *it << "\" ) );" << endl;
> >>        }
> >
> > You don't need this, defaults is already const, so begin() here already
> > returns you a ConstIterator, if QT_STRICT_ITERATORS doesn't understands
> > this i'm all against using it anywhere.
>
> You're right - kconfig_compiler.cpp had so many warnings so I did a
> search'n'replace instead taking a look at the compiler erros.
> So this was m mistake - if you want I can revert it.

I don't think you need to revert. This make the code more clear (to me)

-------------- 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: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081019/9a40dbae/attachment.sig>


More information about the kde-core-devel mailing list