[Kde-pim] Review Request: Add isConfiguring method to AgentBase to easily limit to one configuration dialog per agent.

Martin Bednár serafean at gmail.com
Wed Sep 14 11:22:22 BST 2011


Le Mardi 13 de septembre 2011 13:11:16 Kevin Krammer a écrit :
> On Tuesday, 2011-09-13, Martin Bednár wrote:
> > Le Mardi 13 de septembre 2011 10:14:55 Kevin Krammer a écrit :
> > > I wonder whether it would not be easier to just check this
> > > internally,
> > > e.g. not call configure() if it has already been called and not
> > > returned.
> 
> No, I agree bothering each individual agent/resource developer would be less
> desirable.

Hi,

I'll admit, I'm stuck...

I can't think of a way to do this without modifying agents.

1)The less painful rewrite (I guess) : rename configure() to doConfigure() in 
agents, let AgentBase catch the configure() signal, do its checking and then 
call doConfigure(). Not sure if this is possible technically.

2)Create a new function setConfiguring() to be called in each agent within 
configure() after isConfguring. This requires work in the agents (2 more 
functions in the correct order). The isConfiguring function I created also did 
the work of the eventual setConfiguring() function, making agents only add one 
function call...

I haven't found a way of telling the base class that an overloaded function 
from one of its child has been called except calling a parent's function in 
the child (IOW the agent must be modifie in any case). I would appreciate any 
insight you may have into this.

Thanks, 

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110914/865eb06e/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