KDECore
kpluginloader.cpp
Go to the documentation of this file.
119 kDebug(kLibraryDebugArea()) << "library" << libname << "not found under 'module' but under 'lib'";
133 KPluginLoader::KPluginLoader(const QString &plugin, const KComponentData &componentdata, QObject *parent)
134 : QPluginLoader(findLibraryInternal(plugin, componentdata), parent), d_ptr(new KPluginLoaderPrivate(plugin))
150 KPluginLoader::KPluginLoader(const KService &service, const KComponentData &componentdata, QObject *parent)
151 : QPluginLoader(findLibraryInternal(service.library(), componentdata), parent), d_ptr(new KPluginLoaderPrivate(service.library()))
165 d->errorString = i18n("The service '%1' provides no library or the Library key is missing", service.entryPath());
209 kDebug(kLibraryDebugArea()) << "Expected a KPluginFactory, got a" << obj->metaObject()->className();
236 d->verificationData = (KDEPluginVerificationData *) lib.resolve("kde_plugin_verification_data");
239 || ((d->verificationData->KDEVersion & 0xFFFF00) > (KDE_VERSION & 0xFFFF00)) // newer minor version
240 || (KDE_VERSION_MAJOR << 16 != (d->verificationData->KDEVersion & 0xFF0000))) // different major version
242 d->errorString = i18n("The plugin '%1' uses an incompatible KDE library (%2).", d->name, QString::fromLatin1(d->verificationData->KDEVersionString));
247 kDebug(kLibraryDebugArea()) << "The plugin" << d->name << "doesn't contain a kde_plugin_verification_data structure";
QString i18n(const char *text)
Returns a localized version of a string.
Definition: klocalizedstring.h:630
QString pluginName() const
The name of this plugin as given to the constructor.
Represent a service, like an application or plugin bound to one or several mimetypes (or servicetypes...
Definition: kservice.h:58
const KAboutData * aboutData() const
Returns the about data of this component.
Definition: kcomponentdata.cpp:215
Definition: kexportplugin.h:32
This class can be used to dynamically load a plugin library at runtime.
Definition: kpluginloader.h:79
KPluginLoader(const QString &plugin, const KComponentData &componentdata=KGlobal::mainComponent(), QObject *parent=0)
Used this constructor to load a plugin with a given library name.
Definition: kpluginloader.cpp:133
Thin wrapper around QLibrary; you should rarely use this directly, see KPluginLoader for higher-level...
Definition: klibrary.h:38
KPluginFactory * factory()
Used to obtain the factory object of the plugin.
Definition: kpluginloader.cpp:185
unsigned int version()
Returns the encoded number of KDE's version, see the KDE_VERSION macro.
Definition: kdeversion.cpp:24
QString findResource(const char *type, const QString &filename) const
Tries to find a resource in the following order:
Definition: kstandarddirs.cpp:458
QString findLibraryInternal(const QString &name, const KComponentData &cData)
Definition: kpluginloader.cpp:83
If you develop a library that is to be loaded dynamically at runtime, then you should return a pointe...
Definition: kpluginfactory.h:232
KStandardDirs * dirs() const
Returns the application standard dirs object.
Definition: kcomponentdata.cpp:193
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.