[Kde-pim] Bug in DistributionListManager::save
Thomas McGuire
thomas.mcguire at gmx.net
Sat Jun 16 17:28:13 BST 2007
Hi,
On Thursday 14 June 2007, Mathias Soeken wrote:
> when inserting a Adressee with DistributionList::insertEntry it has the
> same UID as in the corrosponding addressbook, but when calling save on the
> manager, the UID differs from the original, so that there are no addressees
> when opening the distributionlist.
I think I found the problem.
You probably have noticed that during DistributionListManager::save(), all
values for the entry were invalid (including the UID). For me, all string
entries had the name of the distributionlist as value. Clearly invalid.
The reason for this is, I think, the following:
In DistributionList::insertEntry(...), a new Entry is created on the stack,
which is later appended into the list of entires of this distribution list.
For that to work, an entry needs a working copy constructor. In the case of
QList::append(), the DistributionList::Entry::Entry( const
DistributionList::Entry& ) copy constructor is called. However, that one is
empty, containing only a TODO mark.
So the new Entry, which is copy-constructed, only contains random data,
including addressee, and therefore the UID.
It seems that the Entry is not correctly d-pointerized at all. Although it
does have a member named d, it still has two public(!) members, addressee and
email, which is clearly wrong.
So somebody needs to fix the entry class to work properly.
Mathias, do you want to do that?
Regards,
Thomas
_______________________________________________
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