Extending KSettings::Dialog to allow to specify excludes

Aaron J. Seigo aseigo at kde.org
Tue Jun 19 04:16:46 BST 2007


On Monday 18 June 2007, Andreas Pakulat wrote:
> On 19.06.07 00:50:03, Matthias Kretz wrote:
> > On Tuesday 19 June 2007, Aaron J. Seigo wrote:
> > > On Monday 18 June 2007, Andreas Pakulat wrote:
> > > > So I'm proposing to change the constructors to:
> > >
> > > rather than adding a fourth parameter (and second qstringlist =) to the
> > > ctors, would it make sense to have a setter than allows you to set a
> > > blacklist and consult that in createDialogFromServices?
> >
> > I agree from an API design point of view. From the current implementation
> > this is not a straightforward change though, since the information that's
> > passed to the ctor really is needed there.
>
> Well, the blacklist is taken into account during
> createDialogFromServices, so it is possible to do it with a setter.

yes, that's what i saw from reading the code as well....

> However this setter will only work before the show() method of the
> dialog is called the first time. Because afterwards
> createDialogFromServices is not executed anymore. So the setter is not
> really a setter, its more an initializer.

true; but at least it helps keep the ctors cleaner and perhaps at some point 
we can actually make it generally useful (e.g. if it's already init'd, when 
the blacklist is set it could remove panels that match... just a thought, and 
certainly not necessary imho for 4.0.. in fact, i'd actually be surprised if 
anyone used it in that manner at all)

> How about initializeComponentBlacklist( const QStringList&)?

=)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070618/9ddea9ec/attachment.sig>


More information about the kde-core-devel mailing list