author | ulf69 <ulf69> | 2004-06-30 21:52:47 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-06-30 21:52:47 (UTC) |
commit | b8957d8d6437880355312cb008addceac66e9eb2 (patch) (unidiff) | |
tree | b0b65cc826e57e2466f7240ca53f703b3cf6b333 | |
parent | 294b21a5360fdffec72c73bd2513837f14271a01 (diff) | |
download | kdepimpi-b8957d8d6437880355312cb008addceac66e9eb2.zip kdepimpi-b8957d8d6437880355312cb008addceac66e9eb2.tar.gz kdepimpi-b8957d8d6437880355312cb008addceac66e9eb2.tar.bz2 |
added debug information in case of errors
-rw-r--r-- | microkde/kdecore/klibloader.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp index 130cc7c..c07d50f 100644 --- a/microkde/kdecore/klibloader.cpp +++ b/microkde/kdecore/klibloader.cpp | |||
@@ -31,5 +31,9 @@ | |||
31 | #include "klocale.h" | 31 | #include "klocale.h" |
32 | 32 | ||
33 | //US #include "ltdl.h" | 33 | /*US |
34 | #ifndef NDEBUG | ||
35 | #include "ltdl.h" | ||
36 | #endif | ||
37 | */ | ||
34 | 38 | ||
35 | //US do everything through qlibrary | 39 | //US do everything through qlibrary |
@@ -154,9 +158,12 @@ KLibFactory* KLibrary::factory() | |||
154 | QCString symname; | 158 | QCString symname; |
155 | symname.sprintf("init_%s", name().latin1() ); | 159 | symname.sprintf("init_%s", name().latin1() ); |
156 | 160 | ||
157 | void* sym = symbol( symname ); | 161 | void* sym = symbol( symname ); |
158 | if ( !sym ) | 162 | if ( !sym ) |
159 | { | 163 | { |
160 | qDebug("KLibrary: The library %s does not offer an %s function", name().latin1(), symname.data()); | 164 | qDebug("KLibrary: The library %s does not offer an %s function", name().latin1(), symname.data()); |
165 | #ifndef NDEBUG | ||
166 | //US qDebug("KLibrary: errorcode: %s", lt_dlerror()); | ||
167 | #endif | ||
161 | kdWarning(150) << "KLibrary: The library " << name().latin1() << " does not offer an init_" << name().latin1() << " function" << endl; | 168 | kdWarning(150) << "KLibrary: The library " << name().latin1() << " does not offer an init_" << name().latin1() << " function" << endl; |
162 | return 0; | 169 | return 0; |
@@ -408,8 +415,8 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta | |||
408 | #ifndef NDEBUG | 415 | #ifndef NDEBUG |
409 | kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; | 416 | kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; |
410 | #endif | 417 | self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); |
411 | self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); | ||
412 | 418 | ||
413 | qDebug("KLibLoader::library could not find library: %s", libname.data()); | 419 | qDebug("KLibLoader::library could not find library: %s", libname.data()); |
420 | #endif | ||
414 | 421 | ||
415 | } | 422 | } |