From 0538ac1cc17ad4249d27d686b4bc7e80663f475f Mon Sep 17 00:00:00 2001 From: ulf69 Date: Tue, 29 Jun 2004 05:03:25 +0000 Subject: *** empty log message *** --- (limited to 'microkde/kdecore/klibloader.cpp') diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp index 1410308..130cc7c 100644 --- a/microkde/kdecore/klibloader.cpp +++ b/microkde/kdecore/klibloader.cpp @@ -157,7 +157,8 @@ KLibFactory* KLibrary::factory() void* sym = symbol( symname ); if ( !sym ) { - kdWarning(150) << "KLibrary: The library " << name() << " does not offer an init_" << name() << " function" << endl; + qDebug("KLibrary: The library %s does not offer an %s function", name().latin1(), symname.data()); + kdWarning(150) << "KLibrary: The library " << name().latin1() << " does not offer an init_" << name().latin1() << " function" << endl; return 0; } @@ -368,8 +369,15 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta int pos = libname.findRev('/'); if (pos < 0) pos = 0; - if (libname.find('.', pos) < 0) +/*US + if (libname.find('.', pos) < 0) { libname += ".la"; + } +*/ +//US in the microedition we work only with shared libraries. + if (libname.find('.', pos) < 0) { + libname += ".so"; + } // only look up the file if it is not an absolute filename // (mhk, 20000228) @@ -378,6 +386,12 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta libfile = libname; else { +//US at this point the libname must exist as real filesname. No expansions will be made later +// in findResources. Because of that we prepend the lib prefix here to the name +//US I add also the "lib" prefix. I do not how could this could have worked before without it? + libname.insert(pos, "lib"); + + //US libfile = instance->dirs()->findResource( "module", libname ); libfile = KGlobal::dirs()->findResource( "module", libname ); if ( libfile.isEmpty() ) @@ -395,6 +409,9 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; #endif self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); + + qDebug("KLibLoader::library could not find library: %s", libname.data()); + } else self()->d->errorMessage = QString::null; @@ -454,9 +471,6 @@ KLibrary* KLibLoader::library( const char *name ) if ( libfile.isEmpty() ) return 0; - const QString & qpeDir = QPEApplication::qpeDir(); - libfile = qpeDir + libfile; -//US QLibrary *lib = new QLibrary( qpeDir + "/plugins/korganizer/libopiekabc.so", QLibrary::Immediately ); QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately ); //US lt_dlhandle handle = lt_dlopen( libfile.latin1() ); -- cgit v0.9.0.2