summaryrefslogtreecommitdiffabout
path: root/libkdepim/kpimglobalprefs.cpp
authorzautrix <zautrix>2005-04-21 17:43:18 (UTC)
committer zautrix <zautrix>2005-04-21 17:43:18 (UTC)
commitfd38343ef53c9b2a48208f747100579703cc1814 (patch) (unidiff)
tree2aeabdf01986d59d72044615b952a65b4d8ba292 /libkdepim/kpimglobalprefs.cpp
parent0a13a3490ec3bf4735e3435f80f58fa7d50b4448 (diff)
downloadkdepimpi-fd38343ef53c9b2a48208f747100579703cc1814.zip
kdepimpi-fd38343ef53c9b2a48208f747100579703cc1814.tar.gz
kdepimpi-fd38343ef53c9b2a48208f747100579703cc1814.tar.bz2
backup impl
Diffstat (limited to 'libkdepim/kpimglobalprefs.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/kpimglobalprefs.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 90321b2..9c28425 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -179,45 +179,51 @@ void KPimGlobalPrefs::setGlobalConfig()
179 br = nbr+1; 179 br = nbr+1;
180 } 180 }
181 //qDebug("end *%s* ", end.latin1()); 181 //qDebug("end *%s* ", end.latin1());
182 182
183 setLocaleDict( mLocaleDict ); 183 setLocaleDict( mLocaleDict );
184 } else { 184 } else {
185 qDebug("KO: Cannot find translation file %s",fileName.latin1() ); 185 qDebug("KO: Cannot find translation file %s",fileName.latin1() );
186 } 186 }
187 } 187 }
188 } 188 }
189 189
190 KGlobal::locale()->setHore24Format( !mPreferredTime ); 190 KGlobal::locale()->setHore24Format( !mPreferredTime );
191 KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); 191 KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday );
192 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); 192 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate );
193 KGlobal::locale()->setLanguage( mPreferredLanguage ); 193 KGlobal::locale()->setLanguage( mPreferredLanguage );
194 QString dummy = mUserDateFormatLong; 194 QString dummy = mUserDateFormatLong;
195 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 195 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
196 dummy = mUserDateFormatShort; 196 dummy = mUserDateFormatShort;
197 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 197 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
198 KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, 198 KGlobal::locale()->setDaylightSaving( mUseDaylightsaving,
199 mDaylightsavingStart, 199 mDaylightsavingStart,
200 mDaylightsavingEnd ); 200 mDaylightsavingEnd );
201 KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); 201 KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min );
202 KGlobalSettings::setAlternateBackgroundColor(mAlternateColor); 202 KGlobalSettings::setAlternateBackgroundColor(mAlternateColor);
203 QString localKdeDir;
204 localKdeDir = readEnvPath("LOCALMICROKDEHOME");
205 if ( ! localKdeDir.isEmpty() ) {
206 mBackupUseDefaultDir = true;
207 mBackupDatadir = KGlobalSettings::backupDataDir();
208 }
203 209
204} 210}
205KPimGlobalPrefs::~KPimGlobalPrefs() 211KPimGlobalPrefs::~KPimGlobalPrefs()
206{ 212{
207 if (sInstance == this) 213 if (sInstance == this)
208 sInstance = staticDeleterGP.setObject(0); 214 sInstance = staticDeleterGP.setObject(0);
209 else 215 else
210 qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?"); 216 qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?");
211 if ( mLocaleDict ) 217 if ( mLocaleDict )
212 delete mLocaleDict; 218 delete mLocaleDict;
213} 219}
214 220
215KPimGlobalPrefs *KPimGlobalPrefs::instance() 221KPimGlobalPrefs *KPimGlobalPrefs::instance()
216{ 222{
217 if ( !sInstance ) { 223 if ( !sInstance ) {
218 sInstance = staticDeleterGP.setObject( new KPimGlobalPrefs() ); 224 sInstance = staticDeleterGP.setObject( new KPimGlobalPrefs() );
219 sInstance->readConfig(); 225 sInstance->readConfig();
220 } 226 }
221 227
222 return sInstance; 228 return sInstance;
223} 229}