Port Plasma::Dialog to QWindow-based effects API

The WId-based KWindowEffects API is deprecated.
This commit is contained in:
Vlad Zahorodnii 2021-04-27 22:18:55 +03:00
parent 6215355f28
commit 629f4421a7

View File

@ -222,8 +222,8 @@ void DialogPrivate::updateTheme()
{ {
if (backgroundHints == Dialog::NoBackground) { if (backgroundHints == Dialog::NoBackground) {
frameSvgItem->setImagePath(QString()); frameSvgItem->setImagePath(QString());
KWindowEffects::enableBlurBehind(q->winId(), false); KWindowEffects::enableBlurBehind(q, false);
KWindowEffects::enableBackgroundContrast(q->winId(), false); KWindowEffects::enableBackgroundContrast(q, false);
q->setMask(QRegion()); q->setMask(QRegion());
DialogShadows::self()->removeWindow(q); DialogShadows::self()->removeWindow(q);
} else { } else {
@ -237,9 +237,9 @@ void DialogPrivate::updateTheme()
frameSvgItem->setImagePath(prefix + QStringLiteral("dialogs/background")); frameSvgItem->setImagePath(prefix + QStringLiteral("dialogs/background"));
} }
KWindowEffects::enableBlurBehind(q->winId(), theme.blurBehindEnabled(), frameSvgItem->mask()); KWindowEffects::enableBlurBehind(q, theme.blurBehindEnabled(), frameSvgItem->mask());
KWindowEffects::enableBackgroundContrast(q->winId(), KWindowEffects::enableBackgroundContrast(q,
theme.backgroundContrastEnabled(), theme.backgroundContrastEnabled(),
theme.backgroundContrast(), theme.backgroundContrast(),
theme.backgroundIntensity(), theme.backgroundIntensity(),
@ -326,7 +326,7 @@ void DialogPrivate::updateVisibility(bool visible)
break; break;
} }
KWindowEffects::slideWindow(q->winId(), slideLocation, -1); KWindowEffects::slideWindow(q, slideLocation, -1);
} }
if (visible) { if (visible) {