[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
This commit is contained in:
parent
1776b5f927
commit
2b93939a67
2 changed files with 4 additions and 6 deletions
|
@ -77,9 +77,8 @@ MagnifierEffect::~MagnifierEffect()
|
|||
delete m_texture;
|
||||
destroyPixmap();
|
||||
// Save the zoom value.
|
||||
KConfigGroup conf = EffectsHandler::effectConfig(QStringLiteral("Magnifier"));
|
||||
conf.writeEntry("InitialZoom", target_zoom);
|
||||
conf.sync();
|
||||
MagnifierConfig::setInitialZoom(target_zoom);
|
||||
MagnifierConfig::self()->save();
|
||||
}
|
||||
|
||||
void MagnifierEffect::destroyPixmap()
|
||||
|
|
|
@ -142,9 +142,8 @@ ZoomEffect::~ZoomEffect()
|
|||
// switch off and free resources
|
||||
showCursor();
|
||||
// Save the zoom value.
|
||||
KConfigGroup conf = EffectsHandler::effectConfig(QStringLiteral("Zoom"));
|
||||
conf.writeEntry("InitialZoom", target_zoom);
|
||||
conf.sync();
|
||||
ZoomConfig::setInitialZoom(target_zoom);
|
||||
ZoomConfig::self()->save();
|
||||
}
|
||||
|
||||
void ZoomEffect::showCursor()
|
||||
|
|
Loading…
Reference in a new issue