aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2024-09-27 15:43:32 +0800
committerMitch Curtis <mitch.curtis@qt.io>2024-10-02 08:56:53 +0800
commit15b385af9f8e24e8c66588b55a3f7828d70d2c33 (patch)
treef7436ce4fc3cec31989ad6b035f2722ff7d876f3 /src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
parentfd1f8ea4e09cc0a3c007db462db35abbf92ef54d (diff)
Fix BusyIndicator being hidden when running is changed quickly
If running is set to false and then true within a short period, BusyIndicatorImpl's OpacityAnimator cancels the 1 => 0 animation (which was for running being set to false), setting opacity to 0 and hence visible to false. This happens _after_ setRunning(true) was called, because the properties were set synchronously but the animation is asynchronous. To account for this situation, we only hide ourselves if we're not running by storing and checking our running state. Fixes: QTBUG-85860 Pick-to: 6.5 6.7 6.8 Change-Id: I220dfb78f00028e4a12a92fc14082006e1844002 Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h')
-rw-r--r--src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h b/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
index edf9d68078..f98e2a226c 100644
--- a/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
+++ b/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h
@@ -49,6 +49,7 @@ protected:
QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
private:
+ bool m_running = false;
int m_elapsed = 0;
QColor m_pen;
QColor m_fill;