Use C++11 enum class

This commit is contained in:
Jonas Kvinge
2023-02-18 14:09:27 +01:00
parent e6c5f76872
commit dd72fb4ca5
237 changed files with 2915 additions and 2840 deletions

View File

@@ -28,7 +28,7 @@
PrettySlider::PrettySlider(const Qt::Orientation orientation, const SliderMode mode, QWidget *parent, const uint max)
: SliderSlider(orientation, parent, static_cast<int>(max)), m_mode(mode) {
if (m_mode == SliderMode_Pretty) {
if (m_mode == SliderMode::Pretty) {
setFocusPolicy(Qt::NoFocus);
}
@@ -44,7 +44,7 @@ void PrettySlider::mousePressEvent(QMouseEvent *e) {
void PrettySlider::slideEvent(QMouseEvent *e) {
if (m_mode == SliderMode_Pretty) {
if (m_mode == SliderMode::Pretty) {
QSlider::setValue(orientation() == Qt::Horizontal ? QStyle::sliderValueFromPosition(minimum(), maximum(), e->pos().x(), width() - 2) : QStyle::sliderValueFromPosition(minimum(), maximum(), e->pos().y(), height() - 2)); // clazy:exclude=skipped-base-method
}
else {