[effects] Save zoom settings using kcfg generated class

Summary:
We have the kcfg generated settings object, so no need to manually write
the config save code for zoom and magnifier effect.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3338
remotes/origin/bshah/hwcomposer_testing
Martin Gräßlin 9 years ago
parent 1776b5f927
commit 2b93939a67
  1. 5
      effects/magnifier/magnifier.cpp
  2. 5
      effects/zoom/zoom.cpp

@ -77,9 +77,8 @@ MagnifierEffect::~MagnifierEffect()
delete m_texture; delete m_texture;
destroyPixmap(); destroyPixmap();
// Save the zoom value. // Save the zoom value.
KConfigGroup conf = EffectsHandler::effectConfig(QStringLiteral("Magnifier")); MagnifierConfig::setInitialZoom(target_zoom);
conf.writeEntry("InitialZoom", target_zoom); MagnifierConfig::self()->save();
conf.sync();
} }
void MagnifierEffect::destroyPixmap() void MagnifierEffect::destroyPixmap()

@ -142,9 +142,8 @@ ZoomEffect::~ZoomEffect()
// switch off and free resources // switch off and free resources
showCursor(); showCursor();
// Save the zoom value. // Save the zoom value.
KConfigGroup conf = EffectsHandler::effectConfig(QStringLiteral("Zoom")); ZoomConfig::setInitialZoom(target_zoom);
conf.writeEntry("InitialZoom", target_zoom); ZoomConfig::self()->save();
conf.sync();
} }
void ZoomEffect::showCursor() void ZoomEffect::showCursor()

Loading…
Cancel
Save