tdecmoduleloader.cpp
75 TDECModule *module = KParts::ComponentFactory::createInstanceFromFactory<TDECModule>( factory, 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 KLibLoader * self()
static TQString findLibrary(const char *name, const TDEInstance *instance=TDEGlobal::instance())
virtual KLibrary * library(const char *libname)
virtual void unloadLibrary(const char *libname)
bool hasSymbol(const char *name) const
TQString fileName() const
void unload() const
KLibFactory * factory()
void * symbol(const char *name) const
static void detailedError(TQWidget *parent, const TQString &text, const TQString &details, const TQString &caption=TQString::null, int options=Notify)
static int startServiceByDesktopPath(const TQString &_name, const TQString &URL, TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
TQString factoryName() const
Returns the module's factory name, if it's set.
Definition: tdecmoduleinfo.cpp:95
static TDECModule * loadModule(const TDECModuleInfo &module, bool withFallback=true, TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList()) TDE_DEPRECATED
Loads a TDECModule.
Definition: tdecmoduleloader.cpp:116
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
static bool testModule(const TQString &module)
Checks whether an TDECModule should be shown by running its test function.
Definition: tdecmoduleloader.cpp:230
@ Inline
the error report is shown instead of the TDECModule that should have * been loaded
Definition: tdecmoduleloader.h:93
static void showLastLoaderError(TQWidget *parent) TDE_DEPRECATED
Display a message box explaining an error occured and possible reasons to why.
Definition: tdecmoduleloader.cpp:217
static void unloadModule(const TDECModuleInfo &mod)
Unloads the module's library.
Definition: tdecmoduleloader.cpp:204
kndbgstream & endl(kndbgstream &s)
kdbgstream kdDebug(int area=0)
TDEAction * create(StdAction id, const char *name, const TQObject *recvr, const char *slot, TDEActionCollection *parent)