From 1e01a5cfc9dbbf881f236dae92cc1fe2307317a7 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 12 Sep 2014 10:54:00 +0200 Subject: [PATCH] Use KSharedConfig::openConfig instead of KGlobal::config --- generators/dvi/dviRenderer.cpp | 2 +- shell/shell.cpp | 10 +++++----- tests/mainshelltest.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/generators/dvi/dviRenderer.cpp b/generators/dvi/dviRenderer.cpp index 9d8d8683c..12d17b3cc 100644 --- a/generators/dvi/dviRenderer.cpp +++ b/generators/dvi/dviRenderer.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); diff --git a/shell/shell.cpp b/shell/shell.cpp index 13a42b609..dd5db680b 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -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() diff --git a/tests/mainshelltest.cpp b/tests/mainshelltest.cpp index 42d0aac53..2a9ee8dd3 100644 --- a/tests/mainshelltest.cpp +++ b/tests/mainshelltest.cpp @@ -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); }