Fix some iterators, and clean up a bit.
Fix some iterators, and clean up a bit.

svn path=/trunk/KDE/kdepim/; revision=678608

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi