summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/klibloader.cpp6
-rw-r--r--microkde/kdecore/kstandarddirs.cpp21
2 files changed, 23 insertions, 4 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
@@ -395,13 +395,17 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
395 libname.insert(pos, "lib"); 395 libname.insert(pos, "lib");
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;
407#endif 411#endif
@@ -418,8 +422,10 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
418 } 422 }
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
425 431
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
@@ -41,8 +41,10 @@
41#include <qdict.h> 41#include <qdict.h>
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"
48#include "kconfig.h" 50#include "kconfig.h"
@@ -348,18 +350,26 @@ QString KStandardDirs::findResourceDir( const char *type,
348 if (d && d->restrictionsActive && (strcmp(type, "data")==0)) 350 if (d && d->restrictionsActive && (strcmp(type, "data")==0))
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;
365} 375}
@@ -968,11 +978,11 @@ QString KStandardDirs::kde_default(const char *type) {
968 return "share/templates/"; 978 return "share/templates/";
969 if (!strcmp(type, "exe")) 979 if (!strcmp(type, "exe"))
970 return "bin/"; 980 return "bin/";
971 if (!strcmp(type, "lib")) 981 if (!strcmp(type, "lib"))
972 return "lib/"; 982 return "lib/";
973 if (!strcmp(type, "module")) 983 if (!strcmp(type, "module"))
974 return "lib/kde3/"; 984 return "lib/kde3/";
975 if (!strcmp(type, "qtplugins")) 985 if (!strcmp(type, "qtplugins"))
976 return "lib/kde3/plugins"; 986 return "lib/kde3/plugins";
977 if (!strcmp(type, "xdgdata-apps")) 987 if (!strcmp(type, "xdgdata-apps"))
978 return "applications/"; 988 return "applications/";
@@ -1223,9 +1233,12 @@ void KStandardDirs::addKDEDefaults()
1223 } 1233 }
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);
1231 if (execPrefix!="NONE") 1244 if (execPrefix!="NONE")