summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile2
-rw-r--r--microkde/kdecore/klibloader.cpp6
-rw-r--r--microkde/kdecore/kstandarddirs.cpp21
3 files changed, 24 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 620581b..6eb89e7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
1############################################################################# 1#############################################################################
2# Makefile for building: kopi-desktop 2# Makefile for building: kopi-desktop
3# Generated by qmake (1.07a) (Qt 3.3.2) on: Wed Jul 7 13:43:59 2004 3# Generated by qmake (1.07a) (Qt 3.3.2) on: Wed Jul 7 14:00:48 2004
4# Project: kopi-desktop.pro 4# Project: kopi-desktop.pro
5# Template: subdirs 5# Template: subdirs
6# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro 6# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
7############################################################################# 7#############################################################################
8 8
9 MAKEFILE =Makefile 9 MAKEFILE =Makefile
10 QMAKE =qmake 10 QMAKE =qmake
11DEL_FILE = rm -f 11DEL_FILE = rm -f
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
@@ -391,21 +391,25 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
391 { 391 {
392//US at this point the libname must exist as real filesname. No expansions will be made later 392//US at this point the libname must exist as real filesname. No expansions will be made later
393// in findResources. Because of that we prepend the lib prefix here to the name 393// in findResources. Because of that we prepend the lib prefix here to the name
394//US I add also the "lib" prefix. I do not how could this could have worked before without it? 394//US I add also the "lib" prefix. I do not how could this could have worked before without it?
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
408 } 412 }
409 if ( libfile.isEmpty() ) 413 if ( libfile.isEmpty() )
410 { 414 {
411#ifndef NDEBUG 415#ifndef NDEBUG
@@ -414,16 +418,18 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
414 418
415 qDebug("KLibLoader::library could not find library: %s", libname.data()); 419 qDebug("KLibLoader::library could not find library: %s", libname.data());
416#endif 420#endif
417 421
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
426KLibrary* KLibLoader::globalLibrary( const char *name ) 432KLibrary* KLibLoader::globalLibrary( const char *name )
427{ 433{
428KLibrary *tmp; 434KLibrary *tmp;
429/*US 435/*US
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
@@ -37,16 +37,18 @@
37//US#include <pwd.h> 37//US#include <pwd.h>
38 38
39#include <qregexp.h> 39#include <qregexp.h>
40#include <qasciidict.h> 40#include <qasciidict.h>
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"
49#include "kdebug.h" 51#include "kdebug.h"
50//US #include "kinstance.h" 52//US #include "kinstance.h"
51#include "kshell.h" 53#include "kshell.h"
52//US#include <sys/param.h> 54//US#include <sys/param.h>
@@ -344,26 +346,34 @@ QString KStandardDirs::findResourceDir( const char *type,
344 return QString::null; 346 return QString::null;
345 } 347 }
346#endif 348#endif
347 349
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}
366 376
367bool KStandardDirs::exists(const QString &fullPath) 377bool KStandardDirs::exists(const QString &fullPath)
368{ 378{
369//US struct stat buff; 379//US struct stat buff;
@@ -964,19 +974,19 @@ QString KStandardDirs::kde_default(const char *type) {
964 return "cgi-bin/"; 974 return "cgi-bin/";
965 if (!strcmp(type, "wallpaper")) 975 if (!strcmp(type, "wallpaper"))
966 return "share/wallpapers/"; 976 return "share/wallpapers/";
967 if (!strcmp(type, "templates")) 977 if (!strcmp(type, "templates"))
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/";
979 if (!strcmp(type, "xdgdata-dirs")) 989 if (!strcmp(type, "xdgdata-dirs"))
980 return "desktop-directories/"; 990 return "desktop-directories/";
981 if (!strcmp(type, "xdgconf-menu")) 991 if (!strcmp(type, "xdgconf-menu"))
982 return "menus/"; 992 return "menus/";
@@ -1219,17 +1229,20 @@ void KStandardDirs::addKDEDefaults()
1219 if (!kdedir.isEmpty()) 1229 if (!kdedir.isEmpty())
1220 { 1230 {
1221 kdedir = KShell::tildeExpand(kdedir); 1231 kdedir = KShell::tildeExpand(kdedir);
1222 kdedirList.append(kdedir); 1232 kdedirList.append(kdedir);
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")
1232 kdedirList.append(execPrefix); 1245 kdedirList.append(execPrefix);
1233#endif 1246#endif
1234 1247
1235 QString localKdeDir; 1248 QString localKdeDir;