KUtils
kcmoduleloader.cpp
Go to the documentation of this file.
60KCModule *KCModuleLoader::loadModule(const QString &module, ErrorReporting report, QWidget *parent, const QStringList &args)
65KCModule* KCModuleLoader::loadModule(const KCModuleInfo& mod, ErrorReporting report, QWidget* parent, const QStringList& args )
76 mod.moduleName() ), i18n("<qt><p>The diagnosis is:<br />The desktop file %1 could not be found.</p></qt>", mod.fileName()), parent );
79 i18n( "<qt><p>Either the hardware/software the module configures is not available or the module has been disabled by the administrator.</p></qt>" ),
98 kWarning(1208) << "This module still uses K_EXPORT_COMPONENT_FACTORY. Please port it to use KPluginFactory and K_EXPORT_PLUGIN.";
111 create = reinterpret_cast<KCModule *(*)(QWidget *, const char*)>(lib.resolveFunction(factorymethod));
114 kFatal(1208) << "This module still uses a custom factory method (" << factorymethod << "). This is not supported anymore. Please fix the module.";
116 kWarning(1208) << "This module has no valid entry symbol at all. The reason could be that it's still using K_EXPORT_COMPONENT_FACTORY with a custom X-KDE-FactoryName which is not supported anymore";
135 i18n("<qt>The diagnosis is:<br />The desktop file %1 does not specify a library.</qt>", mod.fileName()), parent );
static KLibLoader * self()
static QString errorString(int componentLoadingError)
bool unload()
void_function_ptr resolveFunction(const char *name)
static void detailedError(QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Notify)
#define kWarning
QString i18n(const char *text)
KCModule * loadModule(const KCModuleInfo &module, ErrorReporting report, QWidget *parent=0, const QStringList &args=QStringList())
Loads a KCModule.
Definition: kcmoduleloader.cpp:65
void unloadModule(const KCModuleInfo &mod)
Unloads the module's library.
Definition: kcmoduleloader.cpp:139
KCModule * reportError(ErrorReporting report, const QString &text, const QString &details, QWidget *parent)
Returns a KCModule containing the messages report and text.
Definition: kcmoduleloader.cpp:161
void showLastLoaderError(QWidget *parent)
Display a message box explaining an error occurred and possible reasons to why.
Definition: kcmoduleloader.cpp:147
@ Inline
the error report is shown instead of the KCModule that should have * been loaded
Definition: kcmoduleloader.h:57
const KComponentData & mainComponent()
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.