summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2014-09-12 08:54:00 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2014-09-17 19:15:46 (GMT)
commit1e01a5cfc9dbbf881f236dae92cc1fe2307317a7 (patch)
tree84390495c8c4255652dac6d7c82760f229a6513c
parenta146b5b307e03356825421fd671d9fb704f7341f (diff)
Use KSharedConfig::openConfig instead of KGlobal::config
-rw-r--r--generators/dvi/dviRenderer.cpp2
-rw-r--r--shell/shell.cpp10
-rw-r--r--tests/mainshelltest.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/generators/dvi/dviRenderer.cpp b/generators/dvi/dviRenderer.cpp
index 9d8d868..12d17b3 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 13a42b6..dd5db68 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 42d0aac..2a9ee8d 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);
}