diff --git a/shared/qt/obs-spinbox/DoubleSpinBox.cpp b/shared/qt/obs-spinbox/DoubleSpinBox.cpp index cd7f00f03..46bf536b8 100644 --- a/shared/qt/obs-spinbox/DoubleSpinBox.cpp +++ b/shared/qt/obs-spinbox/DoubleSpinBox.cpp @@ -122,7 +122,7 @@ void DoubleSpinBox::mousePressEvent(QMouseEvent *event) // Mouse button was pressed and is not over the spinbox buttons, forward event to the lineEdit. QRect lineEditRect = lineEdit()->geometry(); - mouseDragYOffset = ((double)height() / 2) - event->position().y(); + mouseDragYOffset = (static_cast(height()) / 2) - event->position().y(); if (!lineEditRect.contains(event->pos())) { QPointF localPos = event->pos() - lineEditRect.topLeft(); @@ -205,7 +205,7 @@ void DoubleSpinBox::wheelEvent(QWheelEvent *event) void DoubleSpinBox::clampCursorPosition() { - QSignalBlocker block(lineEdit()); + QSignalBlocker block{lineEdit()}; if (suffix().isEmpty() && prefix().isEmpty()) { return; diff --git a/shared/qt/obs-spinbox/SpinBox.cpp b/shared/qt/obs-spinbox/SpinBox.cpp index 7861e3660..b3e607d50 100644 --- a/shared/qt/obs-spinbox/SpinBox.cpp +++ b/shared/qt/obs-spinbox/SpinBox.cpp @@ -121,7 +121,7 @@ void SpinBox::mousePressEvent(QMouseEvent *event) // Mouse button was pressed and is not over the spinbox buttons, forward event to the lineEdit. QRect lineEditRect = lineEdit()->geometry(); - mouseDragYOffset = ((double)height() / 2) - event->position().y(); + mouseDragYOffset = (static_cast(height()) / 2) - event->position().y(); if (!lineEditRect.contains(event->pos())) { QPointF localPos = event->pos() - lineEditRect.topLeft(); @@ -129,6 +129,7 @@ void SpinBox::mousePressEvent(QMouseEvent *event) event->buttons(), event->modifiers()); QCoreApplication::sendEvent(lineEdit(), &forwardEvent); + event->accept(); return; } @@ -203,7 +204,7 @@ void SpinBox::wheelEvent(QWheelEvent *event) void SpinBox::clampCursorPosition() { - QSignalBlocker block(lineEdit()); + QSignalBlocker block{lineEdit()}; if (suffix().isEmpty() && prefix().isEmpty()) { return;