Moving KPart args from QStringList to QVariantList

David Faure faure at kde.org
Sat Mar 3 10:59:47 GMT 2007


On Friday 02 March 2007, Aaron J. Seigo wrote:
> this only works if you don't need that information during construction. in 
> this case, it would mean having a rule for applets that they couldn't call 
> their globalAppletConfig or appletConfig methods until after the constructor. 
> and then we'd have to make ++sure that the -first- thing that happens after 
> instantiating the applet is to call setService on it. that is so ugly.

I don't see why an applet needs a KService to get a config object.
Everywhere else in KDE, "objects" know their own instance name and simply use that
to get hold of everything they need.

> another way to go is to change how we do things like figure out the config 
> file names and not base it on the service information, though using the 
> kservice seems like a pretty obvious/elegant way to do that.

That's arguable. It's like you looking me up in the phone book, by my name, and then
calling me to tell me "your name is David". Well, thank you but I knew that :)
Applets should know their own name, that seems pretty obvious to me.

> it's ok, we just won't use KGenericFactory and friends and do the loading more 
> manually, just as kicker ended up doing.
That doesn't really sound like a good solution to me. Makes writing applets more complicated
than it could be.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list