summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-10-03 18:03:18 (UTC)
committer zautrix <zautrix>2004-10-03 18:03:18 (UTC)
commitdd8f6efd23350b101065ddb64f35920f24010185 (patch) (side-by-side diff)
tree76475452c6c8854178a84e5fff863a21a8e117d3 /microkde
parent2a7b61c2b45a0a0344ae65633b2578b4cde1753f (diff)
downloadkdepimpi-dd8f6efd23350b101065ddb64f35920f24010185.zip
kdepimpi-dd8f6efd23350b101065ddb64f35920f24010185.tar.gz
kdepimpi-dd8f6efd23350b101065ddb64f35920f24010185.tar.bz2
Fixes for desktop. Fixed kdehomedir on wintendo
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/kstandarddirs.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index 7f2a326..1c3e0ae 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -42,6 +42,7 @@
#include <qdir.h>
#include <qfileinfo.h>
#include <qstring.h>
+#include <qmessagebox.h>
#include <qapplication.h>
#include <qstringlist.h>
@@ -1204,18 +1205,22 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
static QString readEnvPath(const char *env)
{
-#ifdef _WIN32_
- return "";
-#else
- QCString c_path = getenv(env);
- if (c_path.isEmpty())
- return QString::null;
- return QFile::decodeName(c_path);
-#endif
+ //#ifdef _WIN32_
+ // return "";
+ //#else
+ QCString c_path;
+ if ( getenv(env) != NULL )
+ c_path = QString ( getenv(env) );
+ if (c_path.isEmpty())
+ return QString::null;
+ return QFile::decodeName(c_path);
+ //#endif
+
}
void KStandardDirs::addKDEDefaults()
{
+
//qDebug("ERROR: KStandardDirs::addKDEDefaults() called ");
//return;
QStringList kdedirList;
@@ -1267,8 +1272,14 @@ void KStandardDirs::addKDEDefaults()
localKdeDir = readEnvPath("MICROKDEHOME");
if (!localKdeDir.isEmpty())
{
+#ifdef _WIN32_
+ if (localKdeDir.at(localKdeDir.length()-1) != '\\')
+ localKdeDir += '\\';
+#else
if (localKdeDir.at(localKdeDir.length()-1) != '/')
localKdeDir += '/';
+#endif
+ //QMessageBox::information( 0,"localKdeDir",localKdeDir, 1 );
}
else
{