-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index 5abe05c..1a1e027 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -40,12 +40,13 @@ #include <qasciidict.h> #include <qdict.h> #include <qdir.h> #include <qfileinfo.h> #include <qstring.h> #include <qstringlist.h> +#include <qpe/qpeapplication.h> #include "kstandarddirs.h" #include "kconfig.h" #include "kdebug.h" //US #include "kinstance.h" #include "kshell.h" @@ -347,16 +348,17 @@ QString KStandardDirs::findResourceDir( const char *type, if (d && d->restrictionsActive && (strcmp(type, "data")==0)) applyDataRestrictions(filename); QStringList candidates = resourceDirs(type); QString fullPath; - for (QStringList::ConstIterator it = candidates.begin(); - it != candidates.end(); it++) + for (QStringList::ConstIterator it = candidates.begin(); it != candidates.end(); it++) + { if (exists(*it + filename)) return *it; + } #ifndef NDEBUG if(false && type != "locale") kdDebug() << "KStdDirs::findResDir(): can't find \"" << filename << "\" in type \"" << type << "\"." << endl; #endif @@ -394,12 +396,13 @@ static void lookupDirectory(const QString& path, const QString &relPart, QString pattern = regexp.pattern(); if (recursive || pattern.contains('?') || pattern.contains('*')) { // We look for a set of files. //US DIR *dp = opendir( QFile::encodeName(path)); QDir dp(QFile::encodeName(path)); + if (!dp.exists()) return; static int iii = 0; ++iii; if ( iii == 5 ) abort(); @@ -1218,12 +1221,14 @@ void KStandardDirs::addKDEDefaults() { kdedir = KShell::tildeExpand(kdedir); kdedirList.append(kdedir); } } //US kdedirList.append(KDEDIR); +//US for embedded, add qtopia dir as kdedir + kdedirList.append(QPEApplication::qpeDir()); #ifdef __KDE_EXECPREFIX QString execPrefix(__KDE_EXECPREFIX); if (execPrefix!="NONE") kdedirList.append(execPrefix); #endif |