summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-30 16:36:11 (UTC)
committer zautrix <zautrix>2005-03-30 16:36:11 (UTC)
commit95ec57b2f9df64dc40067c3a2278438029517f4c (patch) (unidiff)
treee1abf6285aa4facedde892dddf1d38baa21b6fb0
parent8c160d7aeeab1d22382ced11440712f6541a6db7 (diff)
downloadkdepimpi-95ec57b2f9df64dc40067c3a2278438029517f4c.zip
kdepimpi-95ec57b2f9df64dc40067c3a2278438029517f4c.tar.gz
kdepimpi-95ec57b2f9df64dc40067c3a2278438029517f4c.tar.bz2
win fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/kstandarddirs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index 4ab1a68..d5bfefd 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -1294,33 +1294,38 @@ void KStandardDirs::addKDEDefaults()
1294 1294
1295#else 1295#else
1296 confFile = QDir::homeDirPath() + "/.microkdehome"; 1296 confFile = QDir::homeDirPath() + "/.microkdehome";
1297#endif 1297#endif
1298 KConfig cfg ( confFile ); 1298 KConfig cfg ( confFile );
1299 cfg.setGroup("Global"); 1299 cfg.setGroup("Global");
1300 localKdeDir = cfg.readEntry( "MICROKDEHOME", QDir::homeDirPath() + "/kdepim/" ); 1300 localKdeDir = cfg.readEntry( "MICROKDEHOME", QDir::homeDirPath() + "/kdepim/" );
1301#ifdef DESKTOP_VERSION 1301#ifdef DESKTOP_VERSION
1302 if ( localKdeDir.startsWith( "LOCAL:" ) ) { 1302 if ( localKdeDir.startsWith( "LOCAL:" ) ) {
1303#ifdef _WIN32_ 1303#ifdef _WIN32_
1304 localKdeDir = qApp->applicationDirPath () + "\\"+ localKdeDir.mid( 6 ); 1304 localKdeDir = qApp->applicationDirPath () + "\\"+ localKdeDir.mid( 6 );
1305#else 1305#else
1306 localKdeDir = qApp->applicationDirPath () + "/"+ localKdeDir.mid( 6 ); 1306 localKdeDir = qApp->applicationDirPath () + "/"+ localKdeDir.mid( 6 );
1307#endif 1307#endif
1308 qDebug("Using local conf dir %s ",localKdeDir.latin1() ); 1308 qDebug("Using local conf dir %s ",localKdeDir.latin1() );
1309 // <stdlib.h> 1309 // <stdlib.h>
1310#ifdef _WIN32_
1311 QString envSt = "LOCALMICROKDEHOME="+localKdeDir;
1312 _putenv( envSt.latin1());
1313#else
1310 setenv( "LOCALMICROKDEHOME", localKdeDir.latin1(), 1 ); 1314 setenv( "LOCALMICROKDEHOME", localKdeDir.latin1(), 1 );
1315#endif
1311 } 1316 }
1312#endif 1317#endif
1313 } 1318 }
1314 } 1319 }
1315 else 1320 else
1316 { 1321 {
1317 // We treat root different to prevent root messing up the 1322 // We treat root different to prevent root messing up the
1318 // file permissions in the users home directory. 1323 // file permissions in the users home directory.
1319 localKdeDir = readEnvPath("MICROKDEROOTHOME"); 1324 localKdeDir = readEnvPath("MICROKDEROOTHOME");
1320 if (!localKdeDir.isEmpty()) 1325 if (!localKdeDir.isEmpty())
1321 { 1326 {
1322 if (localKdeDir.at(localKdeDir.length()-1) != '/') 1327 if (localKdeDir.at(localKdeDir.length()-1) != '/')
1323 localKdeDir += '/'; 1328 localKdeDir += '/';
1324 } 1329 }
1325 else 1330 else
1326 { 1331 {