Diffstat (limited to 'microkde/kdecore/kstandarddirs.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index 1a1e027..7f51d78 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp | |||
@@ -22,49 +22,48 @@ | |||
22 | * Author: Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org> | 22 | * Author: Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org> |
23 | * Version:$Id$ | 23 | * Version:$Id$ |
24 | * Generated:Thu Mar 5 16:05:28 EST 1998 | 24 | * Generated:Thu Mar 5 16:05:28 EST 1998 |
25 | */ | 25 | */ |
26 | 26 | ||
27 | //US #include "config.h" | 27 | //US #include "config.h" |
28 | 28 | ||
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | #include <assert.h> | 30 | #include <assert.h> |
31 | //US#include <errno.h> | 31 | //US#include <errno.h> |
32 | //US #ifdef HAVE_SYS_STAT_H | 32 | //US #ifdef HAVE_SYS_STAT_H |
33 | //US #include <sys/stat.h> | 33 | //US #include <sys/stat.h> |
34 | //US #endif | 34 | //US #endif |
35 | //US#include <sys/types.h> | 35 | //US#include <sys/types.h> |
36 | //US#include <dirent.h> | 36 | //US#include <dirent.h> |
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 <qstringlist.h> | 45 | #include <qstringlist.h> |
46 | #include <qpe/qpeapplication.h> | ||
47 | 46 | ||
48 | #include "kstandarddirs.h" | 47 | #include "kstandarddirs.h" |
49 | #include "kconfig.h" | 48 | #include "kconfig.h" |
50 | #include "kdebug.h" | 49 | #include "kdebug.h" |
51 | //US #include "kinstance.h" | 50 | //US #include "kinstance.h" |
52 | #include "kshell.h" | 51 | #include "kshell.h" |
53 | //US#include <sys/param.h> | 52 | //US#include <sys/param.h> |
54 | //US#include <unistd.h> | 53 | //US#include <unistd.h> |
55 | 54 | ||
56 | //US | 55 | //US |
57 | QString KStandardDirs::mAppDir = QString::null; | 56 | QString KStandardDirs::mAppDir = QString::null; |
58 | 57 | ||
59 | 58 | ||
60 | template class QDict<QStringList>; | 59 | template class QDict<QStringList>; |
61 | 60 | ||
62 | #if 0 | 61 | #if 0 |
63 | #include <qtextedit.h> | 62 | #include <qtextedit.h> |
64 | void ddd( QString op ) | 63 | void ddd( QString op ) |
65 | { | 64 | { |
66 | static QTextEdit * dot = 0; | 65 | static QTextEdit * dot = 0; |
67 | if ( ! dot ) | 66 | if ( ! dot ) |
68 | dot = new QTextEdit(); | 67 | dot = new QTextEdit(); |
69 | 68 | ||
70 | dot->show(); | 69 | dot->show(); |
@@ -1204,49 +1203,49 @@ static QString readEnvPath(const char *env) | |||
1204 | 1203 | ||
1205 | void KStandardDirs::addKDEDefaults() | 1204 | void KStandardDirs::addKDEDefaults() |
1206 | { | 1205 | { |
1207 | //qDebug("ERROR: KStandardDirs::addKDEDefaults() called "); | 1206 | //qDebug("ERROR: KStandardDirs::addKDEDefaults() called "); |
1208 | //return; | 1207 | //return; |
1209 | QStringList kdedirList; | 1208 | QStringList kdedirList; |
1210 | 1209 | ||
1211 | // begin KDEDIRS | 1210 | // begin KDEDIRS |
1212 | QString kdedirs = readEnvPath("MICROKDEDIRS"); | 1211 | QString kdedirs = readEnvPath("MICROKDEDIRS"); |
1213 | if (!kdedirs.isEmpty()) | 1212 | if (!kdedirs.isEmpty()) |
1214 | { | 1213 | { |
1215 | tokenize(kdedirList, kdedirs, ":"); | 1214 | tokenize(kdedirList, kdedirs, ":"); |
1216 | } | 1215 | } |
1217 | else | 1216 | else |
1218 | { | 1217 | { |
1219 | QString kdedir = readEnvPath("MICROKDEDIR"); | 1218 | QString kdedir = readEnvPath("MICROKDEDIR"); |
1220 | if (!kdedir.isEmpty()) | 1219 | if (!kdedir.isEmpty()) |
1221 | { | 1220 | { |
1222 | kdedir = KShell::tildeExpand(kdedir); | 1221 | kdedir = KShell::tildeExpand(kdedir); |
1223 | kdedirList.append(kdedir); | 1222 | kdedirList.append(kdedir); |
1224 | } | 1223 | } |
1225 | } | 1224 | } |
1226 | //US kdedirList.append(KDEDIR); | 1225 | //US kdedirList.append(KDEDIR); |
1227 | //US for embedded, add qtopia dir as kdedir | 1226 | //US for embedded, add qtopia dir as kdedir |
1228 | kdedirList.append(QPEApplication::qpeDir()); | 1227 | kdedirList.append(readEnvPath("QPEDIR" )); |
1229 | 1228 | ||
1230 | #ifdef __KDE_EXECPREFIX | 1229 | #ifdef __KDE_EXECPREFIX |
1231 | QString execPrefix(__KDE_EXECPREFIX); | 1230 | QString execPrefix(__KDE_EXECPREFIX); |
1232 | if (execPrefix!="NONE") | 1231 | if (execPrefix!="NONE") |
1233 | kdedirList.append(execPrefix); | 1232 | kdedirList.append(execPrefix); |
1234 | #endif | 1233 | #endif |
1235 | 1234 | ||
1236 | QString localKdeDir; | 1235 | QString localKdeDir; |
1237 | 1236 | ||
1238 | //US if (getuid()) | 1237 | //US if (getuid()) |
1239 | if (true) | 1238 | if (true) |
1240 | { | 1239 | { |
1241 | localKdeDir = readEnvPath("MICROKDEHOME"); | 1240 | localKdeDir = readEnvPath("MICROKDEHOME"); |
1242 | if (!localKdeDir.isEmpty()) | 1241 | if (!localKdeDir.isEmpty()) |
1243 | { | 1242 | { |
1244 | if (localKdeDir.at(localKdeDir.length()-1) != '/') | 1243 | if (localKdeDir.at(localKdeDir.length()-1) != '/') |
1245 | localKdeDir += '/'; | 1244 | localKdeDir += '/'; |
1246 | } | 1245 | } |
1247 | else | 1246 | else |
1248 | { | 1247 | { |
1249 | localKdeDir = QDir::homeDirPath() + "/kdepim/"; | 1248 | localKdeDir = QDir::homeDirPath() + "/kdepim/"; |
1250 | } | 1249 | } |
1251 | } | 1250 | } |
1252 | else | 1251 | else |