author | zautrix <zautrix> | 2004-07-07 13:35:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-07 13:35:48 (UTC) |
commit | 5030b0bd32b1e526f28ce0339d4b4854492393ae (patch) (unidiff) | |
tree | 0a4bfd70d51f0d9d791511ca536c463d68df8af9 | |
parent | 56721aac86c9ae5253abac8962474c8d1a7e648a (diff) | |
download | kdepimpi-5030b0bd32b1e526f28ce0339d4b4854492393ae.zip kdepimpi-5030b0bd32b1e526f28ce0339d4b4854492393ae.tar.gz kdepimpi-5030b0bd32b1e526f28ce0339d4b4854492393ae.tar.bz2 |
made plugins finding on desktop
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | microkde/kdecore/klibloader.cpp | 6 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 17 |
3 files changed, 22 insertions, 3 deletions
@@ -1,9 +1,9 @@ | |||
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 |
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 | |||
@@ -393,17 +393,21 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta | |||
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() ) |
@@ -416,12 +420,14 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta | |||
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 | ||
426 | KLibrary* KLibLoader::globalLibrary( const char *name ) | 432 | KLibrary* KLibLoader::globalLibrary( const char *name ) |
427 | { | 433 | { |
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 | |||
@@ -39,12 +39,14 @@ | |||
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" |
@@ -346,22 +348,30 @@ QString KStandardDirs::findResourceDir( const char *type, | |||
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 | ||
367 | bool KStandardDirs::exists(const QString &fullPath) | 377 | bool KStandardDirs::exists(const QString &fullPath) |
@@ -1221,13 +1231,16 @@ void KStandardDirs::addKDEDefaults() | |||
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 |