kparts/componentfactory.h (was: plugin loading (was: kcmoduleinfo / Plugin linking problem))

Matthias Kretz kretz at
Wed Aug 15 13:06:46 BST 2007

I started going through the plugin factory code in kdelibs and got stuck at  
kdelibs/kparts/factory.h and kdelibs/kparts/componentfactory.h. The 
KParts::ComponentFactory namespace provides the following methods:

createPartInstanceFromFactory(KParts::Factory *factory, QWidget *parentWidget,
    QObject *parent, const QStringList &args)
LXR: 0 uses

createPartInstanceFromLibrary(const char *libraryName, QWidget *parentWidget,
    QObject *parent, const QStringList &args, int *error)
LXR: 5 uses

createPartInstanceFromService(const KService::Ptr &service, QWidget
    *parentWidget, QObject *parent, const QStringList &args, int *error)
LXR: 5 uses

createPartInstanceFromServices(ServiceIterator begin, ServiceIterator end,
    QWidget *parentWidget, QObject *parent, const QStringList &args, int
LXR: 0 uses

createPartInstanceFromQuery(const QString &mimeType, const QString
    &constraint, QWidget *parentWidget, QObject *parent, const QStringList
    &args, int *error)
LXR: 16 uses

KParts::Factory changes the KLibFactory interface a bit by adding the 
partComponentData and createPartObject functions. The latter function differs 
from the KLibFactory create function only in that it adds a parentWidget 
argument. The partComponentData() function could be moved up to 
KLibFactory/KPluginFactory and renamed to pluginComponentData() or simply 

IMHO we should try to remove both KParts::Factory and 
KParts::ComponentFactory. Opinions?

Matthias Kretz (Germany)                            <><
MatthiasKretz at, kretz at,
Matthias.Kretz at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list