diff --git a/src/gui/painting/qpainterstateguard.cpp b/src/gui/painting/qpainterstateguard.cpp index 96aa182dab8..b62400fa3b6 100644 --- a/src/gui/painting/qpainterstateguard.cpp +++ b/src/gui/painting/qpainterstateguard.cpp @@ -30,10 +30,11 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QPainterStateGuard::QPainterStateGuard(QPainter *painter, InitialState state = Save) + \fn QPainterStateGuard::QPainterStateGuard(QPainter *painter, InitialState state = InitialState::Save) Constructs a QPainterStateGuard and calls save() on \a painter if \a state - is \c Save (which is the default). When QPainterStateGuard is destroyed, restore() - is called as often as save() was called to restore the QPainter's state. + is \c InitialState::Save (which is the default). When QPainterStateGuard is + destroyed, restore() is called as often as save() was called to restore the + QPainter's state. */ /*! diff --git a/src/gui/painting/qpainterstateguard.h b/src/gui/painting/qpainterstateguard.h index dcb7b48f9b0..01e1a0a1163 100644 --- a/src/gui/painting/qpainterstateguard.h +++ b/src/gui/painting/qpainterstateguard.h @@ -13,14 +13,13 @@ class QPainterStateGuard { Q_DISABLE_COPY_MOVE(QPainterStateGuard) public: - enum InitialState - { + enum class InitialState : quint8 { Save, NoSave, }; Q_NODISCARD_CTOR - explicit QPainterStateGuard(QPainter *painter, InitialState state = Save) + explicit QPainterStateGuard(QPainter *painter, InitialState state = InitialState::Save) : m_painter(painter) { Q_ASSERT(painter);