Commit fce0b681 authored by David Edmundson's avatar David Edmundson Committed by David Edmundson
Browse files

[libkworkspace] Watch ksmserverrc for changes

We only need to attach a watcher, that will do implicit reloading so
we'll have the right value when we call readEntry.

BUG: 423864
parent 03528a97
......@@ -57,12 +57,12 @@ SessionBackend *SessionBackend::self()
SessionBackend::SessionBackend()
{
m_kserverConfig = KSharedConfig::openConfig("ksmserverrc");
m_kserverConfig = KConfigWatcher::create(KSharedConfig::openConfig("ksmserverrc"));
}
bool SessionBackend::confirmLogout() const
{
return m_kserverConfig->group("General").readEntry("confirmLogout", true);
return m_kserverConfig->config()->group("General").readEntry("confirmLogout", true);
}
bool SessionBackend::canSwitchUser() const
......
......@@ -18,7 +18,7 @@
*/
#pragma once
#include <KSharedConfig>
#include <KConfigWatcher>
#include <QObject>
#include "kworkspace_export.h"
......@@ -75,7 +75,7 @@ protected:
~SessionBackend() override = default;
private:
KSharedConfigPtr m_kserverConfig;
KConfigWatcher::Ptr m_kserverConfig;
};
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment