[Kde-pim] foreach and akonadi

Tobias Koenig tokoe at kde.org
Mon Apr 28 06:28:25 BST 2008


On Sun, Apr 27, 2008 at 11:50:07PM +0200, David Faure wrote:
> On Sunday 27 April 2008, Tom Albers wrote:
Hej,

> > > Doing my routine foreach cleanup i discovered a few places on akonadi where 
> > > foreach is used to modify the contents of a list
> > > 
> > > Example:
> > >     foreach ( Part part, parts ) {
> > >       part.setData( QByteArray() );
> > >       if ( !part.update() )
> > >         qDebug() << "failed to update item part" << part.id();
> > >     }
> 
> This is indeed a very good reason for always writing foreach(const Part& part, parts),
> which will detect (and refuse) usage of non-const methods.
Tom, does that fix your problem with the missing payloads?

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080428/b4a01050/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list