From baaccb2f414b28f647f50c05081418415c6fd295 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 14 Nov 2024 07:43:34 +0100 Subject: [PATCH] avoid enum bitfields --- src/controls/QskPageIndicator.cpp | 2 +- src/controls/QskSlider.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controls/QskPageIndicator.cpp b/src/controls/QskPageIndicator.cpp index fcf94251..e02760c0 100644 --- a/src/controls/QskPageIndicator.cpp +++ b/src/controls/QskPageIndicator.cpp @@ -59,7 +59,7 @@ class QskPageIndicator::PrivateData int pressedIndex = -1; int count; - Qt::Orientation orientation : 2; + Qt::Orientation orientation; }; QskPageIndicator::QskPageIndicator( int count, QQuickItem* parent ) diff --git a/src/controls/QskSlider.cpp b/src/controls/QskSlider.cpp index cb2b48de..4549a369 100644 --- a/src/controls/QskSlider.cpp +++ b/src/controls/QskSlider.cpp @@ -32,7 +32,7 @@ class QskSlider::PrivateData QPointF pressedPos; qreal pressedValue; bool tracking : 1; - Qt::Orientation orientation : 2; + uint orientation : 2; }; QskSlider::QskSlider( QQuickItem* parent ) @@ -77,13 +77,13 @@ void QskSlider::setOrientation( Qt::Orientation orientation ) resetImplicitSize(); update(); - Q_EMIT orientationChanged( m_data->orientation ); + Q_EMIT orientationChanged( this->orientation() ); } } Qt::Orientation QskSlider::orientation() const { - return m_data->orientation; + return static_cast< Qt::Orientation >( m_data->orientation ); } QskAspect::Variation QskSlider::effectiveVariation() const