KAboutData vs. KPluginInfo
faure at kde.org
Wed Oct 8 00:22:05 BST 2008
On Wednesday 24 September 2008, Andreas Pakulat wrote:
> I'm wondering which of the two a plugin in kde should fill. If one fills
> KAboutData by setting up an instance when creating the factory all kinds
> of good things are possible, like doing a nice grouping in the shortcuts
> OTOH KAboutData is not needed for a plugin to exist, but the information
> from KPluginInfo, fed via its .desktop file is vital. And KPluginInfo
> provides some of the same data, in particular there's a name, there's a
> comment/short description. There's an author (not sure wether a list is
> allowed there), the license and a version number.
> I'm against duplicating this information, so I'd like to know wether a
> plugin in kde should just fill the bare minimum in the .desktop file and
> the rest in the about data, or wether the about-data should be
> automatically filled by KPluginFactory from the .desktop file? Whats the
> "bigger plan" here?
I think the bigger picture is that the KPluginInfo stuff is available to the
hosting application _without_ loading the plugin. It can get that stuff
from desktop files directly.
OTOH KAboutData is the stuff that the plugin provides at runtime,
and which can be used for the about dialog, bug report dialog, etc
(and is more general - every "thing" (componentdata) has an about data)
Well, that's the reason for both to exist. As to how to avoid duplicating
information, I guess your idea of filling some aboutdata from the desktop
file in KPluginFactory is a good idea, I'm just not sure how it would
set that aboutdata (without overwriting the aboutdata set by any
plugin already). Sounds like a good idea overall, but evil lies in the
small implementation details :)
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