summaryrefslogtreecommitdiffabout
path: root/microkde/kdecore/kstandarddirs.cpp
Unidiff
Diffstat (limited to 'microkde/kdecore/kstandarddirs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdecore/kstandarddirs.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index cf0d1ee..810c889 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -1277,48 +1277,58 @@ void KStandardDirs::addKDEDefaults()
1277 localKdeDir += '\\'; 1277 localKdeDir += '\\';
1278#else 1278#else
1279 if (localKdeDir.at(localKdeDir.length()-1) != '/') 1279 if (localKdeDir.at(localKdeDir.length()-1) != '/')
1280 localKdeDir += '/'; 1280 localKdeDir += '/';
1281#endif 1281#endif
1282 //QMessageBox::information( 0,"localKdeDir",localKdeDir, 1 ); 1282 //QMessageBox::information( 0,"localKdeDir",localKdeDir, 1 );
1283 } 1283 }
1284 else 1284 else
1285 { 1285 {
1286 QString confFile; 1286 QString confFile;
1287#ifdef DESKTOP_VERSION 1287#ifdef DESKTOP_VERSION
1288 confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; 1288 confFile = qApp->applicationDirPath ()+ "/.microkdehome" ;
1289 QFileInfo fi ( confFile ); 1289 QFileInfo fi ( confFile );
1290 if ( !fi.exists() ) 1290 if ( !fi.exists() )
1291 confFile = QDir::homeDirPath() + "/.microkdehome"; 1291 confFile = QDir::homeDirPath() + "/.microkdehome";
1292 else 1292 else
1293 qDebug("Loading path info from " + confFile ); 1293 qDebug("Loading path info from " + confFile );
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
1302 if ( localKdeDir.startsWith( "LOCAL:" ) ) {
1303#ifdef _WIN32_
1304 localKdeDir = qApp->applicationDirPath () + "\\"+ localKdeDir.mid( 6 );
1305#else
1306 localKdeDir = qApp->applicationDirPath () + "/"+ localKdeDir.mid( 6 );
1307#endif
1308 qDebug("Using local conf dir %s ",localKdeDir.latin1() );
1309 }
1310#endif
1301 } 1311 }
1302 } 1312 }
1303 else 1313 else
1304 { 1314 {
1305 // We treat root different to prevent root messing up the 1315 // We treat root different to prevent root messing up the
1306 // file permissions in the users home directory. 1316 // file permissions in the users home directory.
1307 localKdeDir = readEnvPath("MICROKDEROOTHOME"); 1317 localKdeDir = readEnvPath("MICROKDEROOTHOME");
1308 if (!localKdeDir.isEmpty()) 1318 if (!localKdeDir.isEmpty())
1309 { 1319 {
1310 if (localKdeDir.at(localKdeDir.length()-1) != '/') 1320 if (localKdeDir.at(localKdeDir.length()-1) != '/')
1311 localKdeDir += '/'; 1321 localKdeDir += '/';
1312 } 1322 }
1313 else 1323 else
1314 { 1324 {
1315//US struct passwd *pw = getpwuid(0); 1325//US struct passwd *pw = getpwuid(0);
1316//US localKdeDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.microkde/"; 1326//US localKdeDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.microkde/";
1317 qDebug("KStandardDirs::addKDEDefaults: 1 has to be fixed"); 1327 qDebug("KStandardDirs::addKDEDefaults: 1 has to be fixed");
1318 } 1328 }
1319 1329
1320 } 1330 }
1321 1331
1322//US localKdeDir = appDir(); 1332//US localKdeDir = appDir();
1323 1333
1324//US 1334//US