Fix narrowing conversions in connects
This commit is contained in:
@@ -185,7 +185,7 @@ void TrackSlider::ValueMaybeChanged(const int value) {
|
||||
if (setting_value_) return;
|
||||
|
||||
UpdateTimes(static_cast<int>(value / kMsecPerSec));
|
||||
emit ValueChangedSeconds(static_cast<int>(value / kMsecPerSec));
|
||||
emit ValueChangedSeconds(static_cast<quint64>(value / kMsecPerSec));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class TrackSlider : public QWidget {
|
||||
|
||||
signals:
|
||||
void ValueChanged(int value);
|
||||
void ValueChangedSeconds(int value);
|
||||
void ValueChangedSeconds(quint64 value);
|
||||
|
||||
void SeekForward();
|
||||
void SeekBackward();
|
||||
|
||||
@@ -141,14 +141,21 @@ void SliderSlider::mouseReleaseEvent(QMouseEvent*) {
|
||||
|
||||
}
|
||||
|
||||
void SliderSlider::setValue(int newValue) {
|
||||
// don't adjust the slider while the user is dragging it!
|
||||
void SliderSlider::SetValueFromVolume(const uint value) {
|
||||
|
||||
setValue(static_cast<int>(value));
|
||||
|
||||
}
|
||||
|
||||
void SliderSlider::setValue(int value) {
|
||||
|
||||
// Don't adjust the slider while the user is dragging it!
|
||||
|
||||
if (!sliding_ || outside_) {
|
||||
QSlider::setValue(adjustValue(newValue));
|
||||
QSlider::setValue(adjustValue(value));
|
||||
}
|
||||
else {
|
||||
prev_value_ = newValue;
|
||||
prev_value_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ class SliderSlider : public QSlider {
|
||||
public:
|
||||
explicit SliderSlider(const Qt::Orientation, QWidget*, const int max = 0);
|
||||
|
||||
virtual void setValue(int);
|
||||
virtual void SetValueFromVolume(const uint value);
|
||||
virtual void setValue(int value);
|
||||
|
||||
// WARNING non-virtual - and thus only really intended for internal use this is a major flaw in the class presently, however it suits our current needs fine
|
||||
int value() const { return adjustValue(QSlider::value()); }
|
||||
|
||||
Reference in New Issue
Block a user