author | zautrix <zautrix> | 2004-07-07 13:35:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-07 13:35:48 (UTC) |
commit | 5030b0bd32b1e526f28ce0339d4b4854492393ae (patch) (side-by-side diff) | |
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,5 +1,5 @@ ############################################################################# # Makefile for building: kopi-desktop -# Generated by qmake (1.07a) (Qt 3.3.2) on: Wed Jul 7 13:43:59 2004 +# Generated by qmake (1.07a) (Qt 3.3.2) on: Wed Jul 7 14:00:48 2004 # Project: kopi-desktop.pro # Template: subdirs 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 @@ -397,9 +397,13 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta //US libfile = instance->dirs()->findResource( "module", libname ); + //qDebug("libname = %s ",libname.data() ); libfile = KGlobal::dirs()->findResource( "module", libname ); + //qDebug("libfile = %s ",libfile.latin1() ); + if ( libfile.isEmpty() ) { //US libfile = instance->dirs()->findResource( "lib", libname ); libfile = KGlobal::dirs()->findResource( "lib", libname ); + //qDebug("libfile2 = %s ",libfile.latin1() ); #ifndef NDEBUG if ( !libfile.isEmpty() && libname.left(3) == "lib" ) // don't warn for kdeinit modules @@ -420,4 +424,6 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta self()->d->errorMessage = QString::null; } + + //qDebug("return libfile = %s ",libfile.latin1() ); return libfile; } 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 @@ -43,4 +43,6 @@ #include <qfileinfo.h> #include <qstring.h> +#include <qapplication.h> + #include <qstringlist.h> @@ -350,7 +352,14 @@ QString KStandardDirs::findResourceDir( const char *type, QStringList candidates = resourceDirs(type); QString fullPath; - +#ifdef DESKTOP_VERSION +#ifdef _WIN32_ + candidates.prepend( qApp->applicationDirPath () +"\\"); +#else + candidates.prepend( qApp->applicationDirPath () +"/"); +#endif +#endif for (QStringList::ConstIterator it = candidates.begin(); it != candidates.end(); it++) { + //qDebug("looking for dir %s - file %s", (*it).latin1(), filename.latin1()); if (exists(*it + filename)) return *it; @@ -359,5 +368,6 @@ QString KStandardDirs::findResourceDir( const char *type, #ifndef NDEBUG if(false && type != "locale") - kdDebug() << "KStdDirs::findResDir(): can't find \"" << filename << "\" in type \"" << type << "\"." << endl; + qDebug("KStdDirs::findResDir(): can't find %s ", filename.latin1()); + #endif @@ -1225,5 +1235,8 @@ void KStandardDirs::addKDEDefaults() //US kdedirList.append(KDEDIR); //US for embedded, add qtopia dir as kdedir + +#ifndef DESKTOP_VERSION kdedirList.append(readEnvPath("QPEDIR" )); +#endif #ifdef __KDE_EXECPREFIX |