KDECore
klibloader.h
Go to the documentation of this file.
55class KDECORE_EXPORT KLibLoader : public QObject //krazy:exclude=dpointer (private class is kept as a global static)
157 static QString findLibrary(const QString &libname, const KComponentData &cData = KGlobal::mainComponent());
166 ErrNoLibrary = 1, /*< the specified library could not be loaded. Use KLibLoader::lastErrorMessage for details*/
169 ErrServiceProvidesNoLibrary, /*< the specified service provides no shared library (when using KService) */
170 ErrNoServiceFound /*< no service implementing the given servicetype and fullfilling the given constraint expression can be found (when using KServiceTypeTrader) */
The KLibLoader allows you to load libraries dynamically at runtime.
Definition klibloader.h:56
static T * createInstance(const QString &libname, QObject *parent, const QStringList &args, int *error=0)
Definition klibloader.h:260
static T * createInstance(const QString &keyword, const QString &libname, QObject *parent=0, const QVariantList &args=QVariantList(), int *error=0)
This template allows to load the specified library and ask the factory to create an instance of the g...
Definition klibloader.h:202
void unloadLibrary(const QString &libname)
Unloads the library with the given name.
Definition klibloader.cpp:123
KPluginFactory * factory(const QString &libname, QLibrary::LoadHints loadHint=0)
Loads and initializes a library.
Definition klibloader.cpp:127
ComponentLoadingError
This enum type defines the possible error cases that can happen when loading a component.
Definition klibloader.h:165
static T * createInstance(const QString &libname, QObject *parent=0, const QVariantList &args=QVariantList(), int *error=0)
This template allows to load the specified library and ask the factory to create an instance of the g...
Definition klibloader.h:248
QString lastErrorMessage() const
Returns an error message that can be useful to debug the problem.
Definition klibloader.cpp:118
KLibrary * library(const QString &libname, QLibrary::LoadHints loadHint=0)
Loads and initializes a library.
Definition klibloader.cpp:89
If you develop a library that is to be loaded dynamically at runtime, then you should return a pointe...
Definition kpluginfactory.h:233
QString findLibrary(const QString &name, const KComponentData &cData)
Definition klibrary.cpp:39
#define T
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.