From 638fc2881cc014ff4fa1ec1abe233ed342420dce Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 9 Nov 2024 18:08:58 +0100 Subject: [PATCH] ContextAlbum: Use fully-qualified QTimeLine::Direction and QTimeLine::State --- src/context/contextalbum.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context/contextalbum.cpp b/src/context/contextalbum.cpp index 7c54b0f92..f1fceb5bf 100644 --- a/src/context/contextalbum.cpp +++ b/src/context/contextalbum.cpp @@ -75,7 +75,7 @@ ContextAlbum::ContextAlbum(QWidget *parent) pixmap_current_ = QPixmap::fromImage(image); } - timeline_fade_->setDirection(QTimeLine::Forward); + timeline_fade_->setDirection(QTimeLine::Direction::Forward); QObject::connect(timeline_fade_, &QTimeLine::valueChanged, this, &ContextAlbum::FadeCurrentCover); QObject::connect(timeline_fade_, &QTimeLine::finished, this, &ContextAlbum::FadeCurrentCoverFinished); @@ -173,8 +173,8 @@ void ContextAlbum::SetImage(const QImage &image) { previous_cover->pixmap = pixmap_previous; previous_cover->opacity = opacity_previous; previous_cover->timeline.reset(new QTimeLine(kFadeTimeLineMs), [](QTimeLine *timeline) { timeline->deleteLater(); }); - previous_cover->timeline->setDirection(QTimeLine::Backward); - previous_cover->timeline->setCurrentTime(timeline_fade_->state() == QTimeLine::Running ? timeline_fade_->currentTime() : kFadeTimeLineMs); + previous_cover->timeline->setDirection(QTimeLine::Direction::Backward); + previous_cover->timeline->setCurrentTime(timeline_fade_->state() == QTimeLine::State::Running ? timeline_fade_->currentTime() : kFadeTimeLineMs); QObject::connect(&*previous_cover->timeline, &QTimeLine::valueChanged, this, [this, previous_cover]() { FadePreviousCover(previous_cover); }); QObject::connect(&*previous_cover->timeline, &QTimeLine::finished, this, [this, previous_cover]() { FadePreviousCoverFinished(previous_cover); }); previous_covers_ << previous_cover;