diff --git a/src/widget/wknobcomposed.cpp b/src/widget/wknobcomposed.cpp index e1f52970f79c..d683689c6132 100644 --- a/src/widget/wknobcomposed.cpp +++ b/src/widget/wknobcomposed.cpp @@ -195,11 +195,11 @@ void WKnobComposed::drawArc(QPainter* pPainter) { arcPen.setCapStyle(m_arcPenCap); pPainter->setPen(arcPen); - if (m_defaultAngle) { + if (m_defaultAngle.has_value()) { // draw arc from default angle to current angle pPainter->drawArc(m_rect, - static_cast((90 - m_defaultAngle.value()) * 16), - static_cast((m_dCurrentAngle - m_defaultAngle.value()) * -16)); + static_cast((90 - *m_defaultAngle) * 16), + static_cast((m_dCurrentAngle - *m_defaultAngle) * -16)); } else if (m_arcUnipolar) { if (m_arcReversed) { // draw arc from maxAngle to current position