[Kde-pim] libakonadi-kde API questions

Frank Osterfeld frank.osterfeld at gmx.de
Sun Mar 30 12:09:46 BST 2008


On Saturday 29 March 2008 22:26:31 Brad Hards wrote:
> On Sunday 30 March 2008 03:33:42 am Volker Krause wrote:
> > > 4) The Monitor has the methods
> > > 'monitorItem/Collection/Resource/MimeType/All()' and we decided to add
> > > the methods 'unmonitorItem/...()'.
> > >    However the word 'unmonitor' doesn't exists, so we should come up
> > >    with something else. Aaron said that 'ignore' would be the
> > >    counterpart of 'monitor', however ignoreItem() could be misleading
> > >    here. Another propose was: monitorItem( Item, bool = true ).
> > >    What do you think?
> >
> > Just for the record: IRC discussion earlier today resulted in
> > setFooMonitored( const Foo &foo, bool = true ) as suggested by Till.
>
> Should the bool argument be an enum instead (Monitored, NotMonitored), to
> match the Qt convention?

To me it's clear from the context what the bool flag refers to. It's  
like a simple bool setter, e.g. setEnabled( bool ), except that it also takes 
the object the flag applies to as argument..
That's quite common in Qt as well, see .e.g. QWidget::setShortcutAutoRepeat(), 
QWidget::setShortcutEnabled(), QWidget::setAttribute().

Frank 
_______________________________________________
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