From 614724f90e76f5295780504abaa650ecefb367f6 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 30 Aug 2023 23:20:29 +0300 Subject: [PATCH] plasma: initialize Plasma::ItemBackgroundPrivate members from its constructor Signed-off-by: Ivailo Monev --- plasma/widgets/itembackground.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plasma/widgets/itembackground.cpp b/plasma/widgets/itembackground.cpp index 3a0a5139..1905c486 100644 --- a/plasma/widgets/itembackground.cpp +++ b/plasma/widgets/itembackground.cpp @@ -38,8 +38,13 @@ class ItemBackgroundPrivate public: ItemBackgroundPrivate(ItemBackground *parent) : q(parent), - target(0) - {} + target(nullptr), + opacity(1.0), + fading(false), + fadeIn(false), + immediate(false) + { + } void animationUpdate(qreal progress); void targetDestroyed(QObject*); @@ -66,10 +71,6 @@ ItemBackground::ItemBackground(QGraphicsWidget *parent) d->anim = new QPropertyAnimation(this, "animationUpdate", this); d->anim->setStartValue(0); d->anim->setEndValue(1); - d->opacity = 1; - d->fading = false; - d->fadeIn = false; - d->immediate = false; d->frameSvg->setImagePath("widgets/viewitem"); d->frameSvg->setEnabledBorders(Plasma::FrameSvg::AllBorders);