summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore/kstandarddirs.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdecore/kstandarddirs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/kstandarddirs.cpp21
1 files changed, 17 insertions, 4 deletions
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
@@ -42,6 +42,8 @@
#include <qdir.h>
#include <qfileinfo.h>
#include <qstring.h>
+#include <qapplication.h>
+
#include <qstringlist.h>
#include "kstandarddirs.h"
@@ -349,16 +351,24 @@ QString KStandardDirs::findResourceDir( const char *type,
applyDataRestrictions(filename);
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;
}
#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
return QString::null;
@@ -969,9 +979,9 @@ QString KStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "exe"))
return "bin/";
if (!strcmp(type, "lib"))
- return "lib/";
+ return "lib/";
if (!strcmp(type, "module"))
- return "lib/kde3/";
+ return "lib/kde3/";
if (!strcmp(type, "qtplugins"))
return "lib/kde3/plugins";
if (!strcmp(type, "xdgdata-apps"))
@@ -1224,7 +1234,10 @@ 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
QString execPrefix(__KDE_EXECPREFIX);