Commit 99dd5d94 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

effects/cubeslide: Port away from deprecated QTimeline curve shape prop

QTimeline::CurveShape has been deprecated in Qt 5.15.
parent 3d0042e0
......@@ -57,7 +57,7 @@ void CubeSlideEffect::reconfigure(ReconfigureFlags)
CubeSlideConfig::self()->read();
// TODO: rename rotationDuration to duration
rotationDuration = animationTime(CubeSlideConfig::rotationDuration() != 0 ? CubeSlideConfig::rotationDuration() : 500);
timeLine.setCurveShape(QTimeLine::EaseInOutCurve);
timeLine.setEasingCurve(QEasingCurve::InOutSine);
timeLine.setDuration(rotationDuration);
dontSlidePanels = CubeSlideConfig::dontSlidePanels();
dontSlideStickyWindows = CubeSlideConfig::dontSlideStickyWindows();
......@@ -367,9 +367,9 @@ void CubeSlideEffect::postPaintScreen()
}
timeLine.setCurrentTime(0);
if (slideRotations.count() == 1)
timeLine.setCurveShape(QTimeLine::EaseOutCurve);
timeLine.setEasingCurve(QEasingCurve::OutSine);
else
timeLine.setCurveShape(QTimeLine::LinearCurve);
timeLine.setEasingCurve(QEasingCurve::Linear);
if (slideRotations.empty()) {
for (EffectWindow* w : staticWindows) {
w->setData(WindowForceBlurRole, QVariant());
......@@ -500,9 +500,9 @@ void CubeSlideEffect::startAnimation() {
}
}
if (slideRotations.count() == 1) {
timeLine.setCurveShape(QTimeLine::EaseInOutCurve);
timeLine.setEasingCurve(QEasingCurve::InOutSine);
} else {
timeLine.setCurveShape(QTimeLine::EaseInCurve);
timeLine.setEasingCurve(QEasingCurve::InSine);
}
effects->setActiveFullScreenEffect(this);
timeLine.setCurrentTime(0);
......
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