kcmoduleloader.cpp
75 KCModule *module = KParts::ComponentFactory::createInstanceFromFactory<KCModule>( 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 KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
121 KCModule* KCModuleLoader::loadModule(const KCModuleInfo &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 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: kcmoduleinfo.cpp:95
static void unloadModule(const KCModuleInfo &mod)
Unloads the module's library.
Definition: kcmoduleloader.cpp:204
@ Inline
the error report is shown instead of the KCModule that should have * been loaded
Definition: kcmoduleloader.h:93
static void showLastLoaderError(TQWidget *parent) KDE_DEPRECATED
Display a message box explaining an error occured and possible reasons to why.
Definition: kcmoduleloader.cpp:217
static KCModule * loadModule(const KCModuleInfo &module, bool withFallback=true, TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList()) KDE_DEPRECATED
Loads a KCModule.
Definition: kcmoduleloader.cpp:116
static bool testModule(const TQString &module)
Checks whether an KCModule should be shown by running its test function.
Definition: kcmoduleloader.cpp:230
static KCModule * reportError(ErrorReporting report, const TQString &text, TQString details, TQWidget *parent)
Returns a KCModule containing the messages report and text.
Definition: kcmoduleloader.cpp:284
static KLibLoader * self()
virtual KLibrary * library(const char *libname)
virtual void unloadLibrary(const char *libname)
static TQString findLibrary(const char *name, const KInstance *instance=KGlobal::instance())
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)
kndbgstream & endl(kndbgstream &s)
kdbgstream kdDebug(int area=0)
KAction * create(StdAction id, const char *name, const TQObject *recvr, const char *slot, KActionCollection *parent)