diff --git a/sm.cpp b/sm.cpp index 05681a4452..6adc49e20b 100644 --- a/sm.cpp +++ b/sm.cpp @@ -42,13 +42,13 @@ bool SessionManaged::saveState( QSessionManager& sm ) { Workspace::self()->sessionSaveStarted(); if( ksmserver ) // save stacking order etc. before "save file?" etc. dialogs change it - Workspace::self()->storeSession( kapp->sessionConfig(), SMSavePhase0 ); + Workspace::self()->storeSession( KGlobal::config(), SMSavePhase0 ); sm.release(); // Qt doesn't automatically release in this case (bug?) sm.requestPhase2(); return true; } - Workspace::self()->storeSession( kapp->sessionConfig(), ksmserver ? SMSavePhase2 : SMSavePhase2Full ); - kapp->sessionConfig()->sync(); + Workspace::self()->storeSession( KGlobal::config(), ksmserver ? SMSavePhase2 : SMSavePhase2Full ); + KGlobal::config()->sync(); return true; } @@ -148,7 +148,7 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase ) void Workspace::loadSessionInfo() { session.clear(); - KConfig* config = kapp->sessionConfig(); + KConfig* config = KGlobal::config(); config->setGroup("Session" ); int count = config->readNumEntry( "count" ); int active_client = config->readNumEntry( "active" ); diff --git a/workspace.cpp b/workspace.cpp index 1bb83aa438..4079b61dd9 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -316,7 +316,7 @@ void Workspace::init() initial_desktop = client_info.currentDesktop(); else { - KConfigGroup group( kapp->sessionConfig(), "Session" ); + KConfigGroup group( KGlobal::config() , "Session" ); initial_desktop = group.readNumEntry( "desktop", 1 ); } if( !setCurrentDesktop( initial_desktop ))