[Kde-pim] Re: working on the 6 steps from Kevin on 30 Juni
Kevin Krammer
kevin.krammer at gmx.at
Fri Jul 8 08:38:38 BST 2011
Hi Guy,
On Thursday, 2011-07-07, guy-kde wrote:
> Hello Kevin!
>
> I am now arrived at step 2)
> and look the method KMailMigrator::localMaildirCreated
>
> the lines
> const QString instanceName = i18n("KMail Folders");
> ...
> instance.setName( instanceName );
>
> and wonder a little bit: If I try to get the name again:
> QString testTheName = instance.name();
>
> I don't get anything back.
Yes, mostly because it is asynchronous, i.e. the Akonadi control process needs
to handle the name change so all clients get notified about it.
But I have run into this as well.
> Having a look to kdepimlibs/akonadi/agentinstance.cpp
> I find a discrepance of the way to store/get the name:
> void AgentInstance::setName( const QString &name )
> {
> AgentManager::self()->d->setName( *this, name );
> }
>
> QString AgentInstance::name() const
> {
> return d->mName;
> }
>
> The memory d->mName don't get written (I think).
>
> What about that?
No idea why setName doesn't at least change this instance's member as well.
Maybe to remind the developer that the name change will only be in affect once
the AgentManager has signalled the change.
If there is no specific reason why this is handled that way we could probably
change it, but behavior change can have nasty side effects as well.
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110708/ba6098ec/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