Use KSharedConfig::openConfig instead of KGlobal::config

frameworks
Frederik Gladhorn 12 years ago
parent a146b5b307
commit 1e01a5cfc9
  1. 2
      generators/dvi/dviRenderer.cpp
  2. 10
      shell/shell.cpp
  3. 2
      tests/mainshelltest.cpp

@ -272,7 +272,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
// here. Most of the code is stolen from there.
// Check if the 'Don't show again' feature was used
KConfig *config = KGlobal::config();
KConfig *config = KSharedConfig::openConfig();
KConfigGroup saver(config, "Notification Messages");
bool showMsg = config->readEntry( "KDVI-info_on_source_specials", true);

@ -251,10 +251,10 @@ void Shell::closeUrl()
void Shell::readSettings()
{
m_recent->loadEntries( KGlobal::config()->group( "Recent Files" ) );
m_recent->loadEntries( KSharedConfig::openConfig()->group( "Recent Files" ) );
m_recent->setEnabled( true ); // force enabling
const KConfigGroup group = KGlobal::config()->group( "Desktop Entry" );
const KConfigGroup group = KSharedConfig::openConfig()->group( "Desktop Entry" );
bool fullScreen = group.readEntry( "FullScreen", false );
setFullScreen( fullScreen );
@ -267,15 +267,15 @@ void Shell::readSettings()
void Shell::writeSettings()
{
m_recent->saveEntries( KGlobal::config()->group( "Recent Files" ) );
KConfigGroup group = KGlobal::config()->group( "Desktop Entry" );
m_recent->saveEntries( KSharedConfig::openConfig()->group( "Recent Files" ) );
KConfigGroup group = KSharedConfig::openConfig()->group( "Desktop Entry" );
group.writeEntry( "FullScreen", m_fullScreenAction->isChecked() );
if (m_fullScreenAction->isChecked())
{
group.writeEntry( shouldShowMenuBarComingFromFullScreen, m_menuBarWasShown );
group.writeEntry( shouldShowToolBarComingFromFullScreen, m_toolBarWasShown );
}
KGlobal::config()->sync();
KSharedConfig::openConfig()->sync();
}
void Shell::setupActions()

@ -102,7 +102,7 @@ void MainShellTest::initTestCase()
QVERIFY( bus->registerService(serviceName) == QDBusConnectionInterface::ServiceRegistered );
// Tell the presentationWidget to not be annoying
KSharedConfigPtr c = KGlobal::config();
KSharedConfigPtr c = KSharedConfig::openConfig();
KConfigGroup cg = c->group("Notification Messages");
cg.writeEntry("presentationInfo", false);
}

Loading…
Cancel
Save