More Web Proxy on the site http://driver.im/
[Kde-pim] Re: working on the 6 steps from Kevin on 30 Juni
Volker Krause
vkrause at kde.org
Sun Jul 10 08:56:59 BST 2011
On Friday 08 July 2011 09:38:38 Kevin Krammer wrote:
> 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.
I don't think there's a special reason for this apart from nobody using it
this way yet :) Should be safe to change.
regards
Volker
-------------- 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/20110710/a7ec2d5b/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