Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit f4b0d85f authored by Frederik Gladhorn's avatar Frederik Gladhorn

Create m_saveTimer lazily

Summary: Making the other timers lazy-initialized is more tricky, so for now just touch the saveTimer.

Reviewers: #plasma, romangg

Reviewed By: #plasma, romangg

Subscribers: romangg, broulik, plasma-devel

Tags: #plasma

Differential Revision:
parent 5b6e9767
......@@ -51,7 +51,7 @@ KScreenDaemon::KScreenDaemon(QObject* parent, const QList< QVariant >& )
, m_monitoredConfig(nullptr)
, m_monitoring(false)
, m_changeCompressor(new QTimer(this))
, m_saveTimer(new QTimer(this))
, m_saveTimer(nullptr)
, m_lidClosedTimer(new QTimer(this))
......@@ -97,10 +97,6 @@ void KScreenDaemon::init()
// Initialize OSD manager to register its dbus interface
m_osdManager = new KScreen::OsdManager(this);
connect(m_saveTimer, &QTimer::timeout, this, &KScreenDaemon::saveCurrentConfig);
connect(m_changeCompressor, &QTimer::timeout, this, &KScreenDaemon::applyConfig);
......@@ -248,6 +244,12 @@ void KScreenDaemon::configChanged()
// Reset timer, delay the writeback
if (!m_saveTimer) {
m_saveTimer = new QTimer(this);
connect(m_saveTimer, &QTimer::timeout, this, &KScreenDaemon::saveCurrentConfig);
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