tdecmoduleloader.cpp
75 TDECModule *module = KParts::ComponentFactory::createInstanceFromFactory<TDECModule>( factory, TQT_TQOBJECT(parent), name ? name : mod.handle().latin1(), args );
80 kdDebug(1208) << "Unable to load module using ComponentFactory. Falling back to old loader." << endl;
116 TDECModule* TDECModuleLoader::loadModule(const TDECModuleInfo &mod, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
121 TDECModule* TDECModuleLoader::loadModule(const TDECModuleInfo &mod, ErrorReporting report, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
145 i18n("<qt><p>The diagnostics is:<br>The desktop file %1 could not be found.</p></qt>").arg(mod.fileName()),
161 if (!KLibLoader::findLibrary( TQCString( "libkcm_" ) + TQFile::encodeName( mod.library() ) ).isEmpty() )
186 .arg( mod.moduleName() ), i18n("<qt><p>The diagnostics is:<br>The desktop file %1 does not specify a library.</qt>").arg(mod.fileName()), parent );
257 KLibrary* library = loader->library( TQFile::encodeName((TQString("kcm_%1").arg(module.library()))) );
260 void *test_func = library->symbol( TQString(TQString("test_%1").arg(module.factoryName())).utf8() );
275 kdDebug(1208) << "The test function for module '" << module.fileName() << "' could not be found." << endl;
static void showLastLoaderError(TQWidget *parent) KDE_DEPRECATED
Display a message box explaining an error occured and possible reasons to why.
Definition: tdecmoduleloader.cpp:217
the error report is shown instead of the TDECModule that should have * been loaded ...
Definition: tdecmoduleloader.h:93
static bool testModule(const TQString &module)
Checks whether an TDECModule should be shown by running its test function.
Definition: tdecmoduleloader.cpp:230
static TDECModule * loadModule(const TDECModuleInfo &module, bool withFallback=true, TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList()) KDE_DEPRECATED
Loads a TDECModule.
Definition: tdecmoduleloader.cpp:116
kdbgstream kdDebug(int area=0)
static void detailedError(TQWidget *parent, const TQString &text, const TQString &details, const TQString &caption=TQString::null, int options=Notify)
TQString fileName() const
static TDECModule * reportError(ErrorReporting report, const TQString &text, TQString details, TQWidget *parent)
Returns a TDECModule containing the messages report and text.
Definition: tdecmoduleloader.cpp:284
TQString factoryName() const
Returns the module's factory name, if it's set.
Definition: tdecmoduleinfo.cpp:95
virtual void unloadLibrary(const char *libname)
void unload() const
KLibFactory * factory()
bool hasSymbol(const char *name) const
virtual KLibrary * library(const char *libname)
static KLibLoader * self()
static TQString findLibrary(const char *name, const TDEInstance *instance=TDEGlobal::instance())
TDEAction * create(StdAction id, const char *name, const TQObject *recvr, const char *slot, TDEActionCollection *parent)
void * symbol(const char *name) const
kndbgstream & endl(kndbgstream &s)
static void unloadModule(const TDECModuleInfo &mod)
Unloads the module's library.
Definition: tdecmoduleloader.cpp:204