summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdecore/klibloader.cpp6
-rw-r--r--microkde/kdecore/kstandarddirs.cpp17
2 files changed, 21 insertions, 2 deletions
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp
index c091e05..9eee912 100644
--- a/microkde/kdecore/klibloader.cpp
+++ b/microkde/kdecore/klibloader.cpp
@@ -396,11 +396,15 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
396 396
397 397
398//US libfile = instance->dirs()->findResource( "module", libname ); 398//US libfile = instance->dirs()->findResource( "module", libname );
399 //qDebug("libname = %s ",libname.data() );
399 libfile = KGlobal::dirs()->findResource( "module", libname ); 400 libfile = KGlobal::dirs()->findResource( "module", libname );
401 //qDebug("libfile = %s ",libfile.latin1() );
402
400 if ( libfile.isEmpty() ) 403 if ( libfile.isEmpty() )
401 { 404 {
402//US libfile = instance->dirs()->findResource( "lib", libname ); 405//US libfile = instance->dirs()->findResource( "lib", libname );
403 libfile = KGlobal::dirs()->findResource( "lib", libname ); 406 libfile = KGlobal::dirs()->findResource( "lib", libname );
407 //qDebug("libfile2 = %s ",libfile.latin1() );
404#ifndef NDEBUG 408#ifndef NDEBUG
405 if ( !libfile.isEmpty() && libname.left(3) == "lib" ) // don't warn for kdeinit modules 409 if ( !libfile.isEmpty() && libname.left(3) == "lib" ) // don't warn for kdeinit modules
406 kdDebug(150) << "library " << libname << " not found under 'module' but under 'lib'" << endl; 410 kdDebug(150) << "library " << libname << " not found under 'module' but under 'lib'" << endl;
@@ -419,6 +423,8 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
419 else 423 else
420 self()->d->errorMessage = QString::null; 424 self()->d->errorMessage = QString::null;
421 } 425 }
426
427 //qDebug("return libfile = %s ",libfile.latin1() );
422 return libfile; 428 return libfile;
423} 429}
424 430
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index 7f51d78..e1c78f6 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -42,6 +42,8 @@
42#include <qdir.h> 42#include <qdir.h>
43#include <qfileinfo.h> 43#include <qfileinfo.h>
44#include <qstring.h> 44#include <qstring.h>
45#include <qapplication.h>
46
45#include <qstringlist.h> 47#include <qstringlist.h>
46 48
47#include "kstandarddirs.h" 49#include "kstandarddirs.h"
@@ -349,16 +351,24 @@ QString KStandardDirs::findResourceDir( const char *type,
349 applyDataRestrictions(filename); 351 applyDataRestrictions(filename);
350 QStringList candidates = resourceDirs(type); 352 QStringList candidates = resourceDirs(type);
351 QString fullPath; 353 QString fullPath;
352 354#ifdef DESKTOP_VERSION
355#ifdef _WIN32_
356 candidates.prepend( qApp->applicationDirPath () +"\\");
357#else
358 candidates.prepend( qApp->applicationDirPath () +"/");
359#endif
360#endif
353 for (QStringList::ConstIterator it = candidates.begin(); it != candidates.end(); it++) 361 for (QStringList::ConstIterator it = candidates.begin(); it != candidates.end(); it++)
354 { 362 {
363 //qDebug("looking for dir %s - file %s", (*it).latin1(), filename.latin1());
355 if (exists(*it + filename)) 364 if (exists(*it + filename))
356 return *it; 365 return *it;
357 } 366 }
358 367
359#ifndef NDEBUG 368#ifndef NDEBUG
360 if(false && type != "locale") 369 if(false && type != "locale")
361 kdDebug() << "KStdDirs::findResDir(): can't find \"" << filename << "\" in type \"" << type << "\"." << endl; 370 qDebug("KStdDirs::findResDir(): can't find %s ", filename.latin1());
371
362#endif 372#endif
363 373
364 return QString::null; 374 return QString::null;
@@ -1224,7 +1234,10 @@ void KStandardDirs::addKDEDefaults()
1224 } 1234 }
1225//US kdedirList.append(KDEDIR); 1235//US kdedirList.append(KDEDIR);
1226//US for embedded, add qtopia dir as kdedir 1236//US for embedded, add qtopia dir as kdedir
1237
1238#ifndef DESKTOP_VERSION
1227 kdedirList.append(readEnvPath("QPEDIR" )); 1239 kdedirList.append(readEnvPath("QPEDIR" ));
1240#endif
1228 1241
1229#ifdef __KDE_EXECPREFIX 1242#ifdef __KDE_EXECPREFIX
1230 QString execPrefix(__KDE_EXECPREFIX); 1243 QString execPrefix(__KDE_EXECPREFIX);