[kwin] Port away from deprected KCoreConfigSkeleton::readConfig
Most is just switched to the ::read(). That should be enough for all the Effects which have a KSharedConfig::Ptr underneath. If not we just need to find a good place to put the reload.
This commit is contained in:
parent
a2aab537d6
commit
77fff7af6a
28 changed files with 29 additions and 29 deletions
|
@ -78,7 +78,7 @@ void BlurEffect::reconfigure(ReconfigureFlags flags)
|
|||
{
|
||||
Q_UNUSED(flags)
|
||||
|
||||
BlurConfig::self()->readConfig();
|
||||
BlurConfig::self()->read();
|
||||
int radius = qBound(2, BlurConfig::blurRadius(), 14);
|
||||
if (shader)
|
||||
shader->setRadius(radius);
|
||||
|
|
|
@ -93,7 +93,7 @@ bool CoverSwitchEffect::supported()
|
|||
|
||||
void CoverSwitchEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
CoverSwitchConfig::self()->readConfig();
|
||||
CoverSwitchConfig::self()->read();
|
||||
animationDuration = animationTime<CoverSwitchConfig>(200);
|
||||
animateSwitch = CoverSwitchConfig::animateSwitch();
|
||||
animateStart = CoverSwitchConfig::animateStart();
|
||||
|
|
|
@ -130,7 +130,7 @@ bool CubeEffect::supported()
|
|||
|
||||
void CubeEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
CubeConfig::self()->readConfig();
|
||||
CubeConfig::self()->read();
|
||||
foreach (ElectricBorder border, borderActivate) {
|
||||
effects->unreserveElectricBorder(border, this);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ bool CubeSlideEffect::supported()
|
|||
|
||||
void CubeSlideEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
CubeSlideConfig::self()->readConfig();
|
||||
CubeSlideConfig::self()->read();
|
||||
// TODO: rename rotationDuration to duration
|
||||
rotationDuration = animationTime(CubeSlideConfig::rotationDuration() != 0 ? CubeSlideConfig::rotationDuration() : 500);
|
||||
timeLine.setCurveShape(QTimeLine::EaseInOutCurve);
|
||||
|
|
|
@ -50,7 +50,7 @@ DashboardEffect::~DashboardEffect()
|
|||
|
||||
void DashboardEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
DashboardConfig::self()->readConfig();
|
||||
DashboardConfig::self()->read();
|
||||
brightness = DashboardConfig::brightness()/ 100.0;
|
||||
saturation = DashboardConfig::saturation()/ 100.0;
|
||||
blur = DashboardConfig::blur();
|
||||
|
|
|
@ -95,7 +95,7 @@ DesktopGridEffect::~DesktopGridEffect()
|
|||
|
||||
void DesktopGridEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
DesktopGridConfig::self()->readConfig();
|
||||
DesktopGridConfig::self()->read();
|
||||
|
||||
foreach (ElectricBorder border, borderActivate) {
|
||||
effects->unreserveElectricBorder(border, this);
|
||||
|
|
|
@ -41,7 +41,7 @@ DimInactiveEffect::DimInactiveEffect()
|
|||
|
||||
void DimInactiveEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
DimInactiveConfig::self()->readConfig();
|
||||
DimInactiveConfig::self()->read();
|
||||
dim_panels = DimInactiveConfig::dimPanels();
|
||||
dim_desktop = DimInactiveConfig::dimDesktop();
|
||||
dim_keepabove = DimInactiveConfig::dimKeepAbove();
|
||||
|
|
|
@ -88,7 +88,7 @@ bool FlipSwitchEffect::supported()
|
|||
|
||||
void FlipSwitchEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
FlipSwitchConfig::self()->readConfig();
|
||||
FlipSwitchConfig::self()->read();
|
||||
m_tabbox = FlipSwitchConfig::tabBox();
|
||||
m_tabboxAlternative = FlipSwitchConfig::tabBoxAlternative();
|
||||
const int duration = animationTime<FlipSwitchConfig>(200);
|
||||
|
|
|
@ -60,7 +60,7 @@ bool GlideEffect::supported()
|
|||
void GlideEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
// Fetch config with KConfigXT
|
||||
GlideConfig::self()->readConfig();
|
||||
GlideConfig::self()->read();
|
||||
duration = animationTime<GlideConfig>(350);
|
||||
effect = (EffectStyle) GlideConfig::glideEffect();
|
||||
angle = GlideConfig::glideAngle();
|
||||
|
|
|
@ -67,7 +67,7 @@ void KscreenEffect::reconfigure(ReconfigureFlags flags)
|
|||
{
|
||||
Q_UNUSED(flags)
|
||||
|
||||
KscreenConfig::self()->readConfig();
|
||||
KscreenConfig::self()->read();
|
||||
m_timeLine.setDuration(animationTime<KscreenConfig>(250));
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ LogoutEffect::~LogoutEffect()
|
|||
|
||||
void LogoutEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
LogoutConfig::self()->readConfig();
|
||||
LogoutConfig::self()->read();
|
||||
frameDelay = 0;
|
||||
useBlur = LogoutConfig::useBlur();
|
||||
delete blurTexture;
|
||||
|
|
|
@ -85,7 +85,7 @@ bool LookingGlassEffect::supported()
|
|||
|
||||
void LookingGlassEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
LookingGlassConfig::self()->readConfig();
|
||||
LookingGlassConfig::self()->read();
|
||||
initialradius = LookingGlassConfig::radius();
|
||||
radius = initialradius;
|
||||
qCDebug(KWINEFFECTS) << QStringLiteral("Radius from config: %1").arg(radius) << endl;
|
||||
|
|
|
@ -48,7 +48,7 @@ bool MagicLampEffect::supported()
|
|||
|
||||
void MagicLampEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
MagicLampConfig::self()->readConfig();
|
||||
MagicLampConfig::self()->read();
|
||||
// TODO: rename animationDuration to duration
|
||||
mAnimationDuration = animationTime(MagicLampConfig::animationDuration() != 0 ? MagicLampConfig::animationDuration() : 250);
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ bool MagnifierEffect::supported()
|
|||
|
||||
void MagnifierEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
MagnifierConfig::self()->readConfig();
|
||||
MagnifierConfig::self()->read();
|
||||
int width, height;
|
||||
width = MagnifierConfig::width();
|
||||
height = MagnifierConfig::height();
|
||||
|
|
|
@ -76,7 +76,7 @@ MouseClickEffect::~MouseClickEffect()
|
|||
|
||||
void MouseClickEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
MouseClickConfig::self()->readConfig();
|
||||
MouseClickConfig::self()->read();
|
||||
m_colors[0] = MouseClickConfig::color1();
|
||||
m_colors[1] = MouseClickConfig::color2();
|
||||
m_colors[2] = MouseClickConfig::color3();
|
||||
|
|
|
@ -76,7 +76,7 @@ MouseMarkEffect::~MouseMarkEffect()
|
|||
static int width_2 = 1;
|
||||
void MouseMarkEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
MouseMarkConfig::self()->readConfig();
|
||||
MouseMarkConfig::self()->read();
|
||||
width = MouseMarkConfig::lineWidth();
|
||||
width_2 = width / 2;
|
||||
color = MouseMarkConfig::color();
|
||||
|
|
|
@ -107,7 +107,7 @@ PresentWindowsEffect::~PresentWindowsEffect()
|
|||
|
||||
void PresentWindowsEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
PresentWindowsConfig::self()->readConfig();
|
||||
PresentWindowsConfig::self()->read();
|
||||
foreach (ElectricBorder border, m_borderActivate) {
|
||||
effects->unreserveElectricBorder(border, this);
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window
|
|||
void ResizeEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
m_features = 0;
|
||||
ResizeConfig::self()->readConfig();
|
||||
ResizeConfig::self()->read();
|
||||
if (ResizeConfig::textureScale())
|
||||
m_features |= TextureScale;
|
||||
if (ResizeConfig::outline())
|
||||
|
|
|
@ -48,7 +48,7 @@ bool SheetEffect::supported()
|
|||
|
||||
void SheetEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
SheetConfig::self()->readConfig();
|
||||
SheetConfig::self()->read();
|
||||
duration = animationTime(SheetConfig::animationTime() != 0 ? SheetConfig::animationTime() : 500);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ ShowFpsEffect::ShowFpsEffect()
|
|||
|
||||
void ShowFpsEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
ShowFpsConfig::self()->readConfig();
|
||||
ShowFpsConfig::self()->read();
|
||||
alpha = ShowFpsConfig::alpha();
|
||||
x = ShowFpsConfig::x();
|
||||
y = ShowFpsConfig::y();
|
||||
|
|
|
@ -49,7 +49,7 @@ ThumbnailAsideEffect::ThumbnailAsideEffect()
|
|||
|
||||
void ThumbnailAsideEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
ThumbnailAsideConfig::self()->readConfig();
|
||||
ThumbnailAsideConfig::self()->read();
|
||||
maxwidth = ThumbnailAsideConfig::maxWidth();
|
||||
spacing = ThumbnailAsideConfig::spacing();
|
||||
opacity = ThumbnailAsideConfig::opacity()/100.0;
|
||||
|
|
|
@ -84,7 +84,7 @@ TrackMouseEffect::~TrackMouseEffect()
|
|||
void TrackMouseEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
m_modifiers = 0;
|
||||
TrackMouseConfig::self()->readConfig();
|
||||
TrackMouseConfig::self()->read();
|
||||
if (TrackMouseConfig::shift())
|
||||
m_modifiers |= Qt::ShiftModifier;
|
||||
if (TrackMouseConfig::alt())
|
||||
|
|
|
@ -80,7 +80,7 @@ WindowGeometry::~WindowGeometry()
|
|||
|
||||
void WindowGeometry::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
WindowGeometryConfiguration::self()->readConfig();
|
||||
WindowGeometryConfiguration::self()->read();
|
||||
iHandleMoves = WindowGeometryConfiguration::move();
|
||||
iHandleResizes = WindowGeometryConfiguration::resize();
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ WobblyWindowsEffect::~WobblyWindowsEffect()
|
|||
|
||||
void WobblyWindowsEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
WobblyWindowsConfig::self()->readConfig();
|
||||
WobblyWindowsConfig::self()->read();
|
||||
|
||||
QString settingsMode = WobblyWindowsConfig::settings();
|
||||
if (settingsMode != QStringLiteral("Custom")) {
|
||||
|
|
|
@ -225,7 +225,7 @@ void ZoomEffect::recreateTexture()
|
|||
|
||||
void ZoomEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
ZoomConfig::self()->readConfig();
|
||||
ZoomConfig::self()->read();
|
||||
// On zoom-in and zoom-out change the zoom by the defined zoom-factor.
|
||||
zoomFactor = qMax(0.1, ZoomConfig::zoomFactor());
|
||||
// Visibility of the mouse-pointer.
|
||||
|
|
|
@ -776,7 +776,7 @@ void Options::updateSettings()
|
|||
|
||||
void Options::loadConfig()
|
||||
{
|
||||
m_settings->readConfig();
|
||||
m_settings->load();
|
||||
KDecorationOptions::updateSettings(m_settings->config()); // read decoration settings
|
||||
|
||||
syncFromKcfgc();
|
||||
|
|
|
@ -86,7 +86,7 @@ void Screens::reconfigure()
|
|||
return;
|
||||
}
|
||||
Settings settings(m_config);
|
||||
settings.readConfig();
|
||||
settings.read();
|
||||
setCurrentFollowsMouse(settings.activeMouseScreen());
|
||||
}
|
||||
|
||||
|
|
|
@ -405,7 +405,7 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript
|
|||
KConfigGroup cg = effects->effectConfig(m_effectName);
|
||||
QFile xmlFile(kconfigXTFile);
|
||||
m_config = new KConfigLoader(cg, &xmlFile, this);
|
||||
m_config->readConfig();
|
||||
m_config->load();
|
||||
}
|
||||
|
||||
QScriptValue effectsObject = m_engine->newQObject(effects, QScriptEngine::QtOwnership, QScriptEngine::ExcludeDeleteLater);
|
||||
|
@ -527,7 +527,7 @@ void ScriptedEffect::reconfigure(ReconfigureFlags flags)
|
|||
{
|
||||
AnimationEffect::reconfigure(flags);
|
||||
if (m_config) {
|
||||
m_config->readConfig();
|
||||
m_config->read();
|
||||
}
|
||||
emit configChanged();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue