[PATCH] Support for KUrl in KConfigXT and KCModule's

Andreas Pakulat apaku at gmx.de
Mon Mar 19 17:48:51 GMT 2007


On 19.03.07 11:33:17, Aaron J. Seigo wrote:
> On March 19, 2007, Andreas Pakulat wrote:
> > as proposed I added support for KUrl to KConfigXT and
> > KConfigDialogManager, the attached patch adds a new
> > KConfigSkeletonItem and adds the two missing signals for
> > change-notification to KConfigDialogManager. Luckily KUrlRequester
> 
> please follow the kdelibs style guidelines. otherwise, looks good.

Oh, did I screw up something? I'll check :)

> > I'm not sure wether KUrl::List is needed as I don't see any widgets that
> > work on such a type, but it should be relatively easy to add support for
> > that.
> 
> widgets are only half the question; kconfigxt is used without UIs as well =)

Hmm, well as QStringList and PathList are supported too I guess its fair
enough to have KUrl::List too.

> > One problematic thing is that any app that wants to use KUrl wrapped in
> > a QVariant needs to call qRegisterMetaType<KUrl>("KUrl");. I think this
> > should be somewhere in kconfig or maybe even KUrl code, but I'm not sure
> > where to put it, so any comments welcome regarding that. KUrl
> > constructor might be a good enough place, as calling the function
> > multiple times doesn't seem to be a problem.
> 
> except for the added overhead of the call since KUrl needs to be fast. it 
> doesn't look like the overhead is all that great, but still =) though, yes, i 
> do think we should register these things just to make application code easier 
> to write. i don't like the idea of such magical lines needing to be uttered 
> everywhere.

I'd like to note that kurl.h already uses the Q_DECLARE_METATYPE macro,
just not the qRegisterMetatype() call which gives nice error messages
when trying to put KUrl into a QVariant :)

> one place that might be of lowermpact than kurl's ctor is in KApplication? we 
> could register the qvariants we want to be considered 'first class' items in 
> kde apps. kurl would be amongst those, imho.

Sounds like a plan.

Andreas

-- 
Don't let your mind wander -- it's too little to be let out alone.




More information about the kde-core-devel mailing list