summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon')
-rw-r--r--src/3rdparty/phonon/ds9/effect.cpp3
-rw-r--r--src/3rdparty/phonon/phonon/effectwidget.cpp11
2 files changed, 7 insertions, 7 deletions
diff --git a/src/3rdparty/phonon/ds9/effect.cpp b/src/3rdparty/phonon/ds9/effect.cpp
index dc4ac3d..104a3c1 100644
--- a/src/3rdparty/phonon/ds9/effect.cpp
+++ b/src/3rdparty/phonon/ds9/effect.cpp
@@ -138,8 +138,7 @@ namespace Phonon
ComPointer<IMediaParams> params(filter, IID_IMediaParams);
Q_ASSERT(params);
- MP_DATA data = float(v.toDouble());
- params->SetParam(p.id(), data);
+ params->SetParam(p.id(), v.toFloat());
}
}
diff --git a/src/3rdparty/phonon/phonon/effectwidget.cpp b/src/3rdparty/phonon/phonon/effectwidget.cpp
index 99478f7..fb9cf6e 100644
--- a/src/3rdparty/phonon/phonon/effectwidget.cpp
+++ b/src/3rdparty/phonon/phonon/effectwidget.cpp
@@ -157,19 +157,20 @@ void EffectWidgetPrivate::autogenerateUi()
QObject::connect(sb, SIGNAL(valueChanged(int)), q, SLOT(_k_setIntParameter(int)));
}
break;
+ case QMetaType::Float:
case QVariant::Double:
{
- const double minValue = (para.minimumValue().type() == QVariant::Double ?
- para.minimumValue().toDouble() : DEFAULT_MIN);
- const double maxValue = (para.maximumValue().type() == QVariant::Double ?
- para.maximumValue().toDouble() : DEFAULT_MAX);
+ const qreal minValue = para.minimumValue().canConvert(QVariant::Double) ?
+ para.minimumValue().toReal() : DEFAULT_MIN;
+ const qreal maxValue = para.maximumValue().canConvert(QVariant::Double) ?
+ para.maximumValue().toReal() : DEFAULT_MAX;
if (minValue == -1. && maxValue == 1.) {
//Special case values between -1 and 1.0 to use a slider for improved usability
QSlider *slider = new QSlider(Qt::Horizontal, q);
control = slider;
slider->setRange(-SLIDER_RANGE, +SLIDER_RANGE);
- slider->setValue(int(SLIDER_RANGE * value.toDouble()));
+ slider->setValue(int(SLIDER_RANGE * value.toReal()));
slider->setTickPosition(QSlider::TicksBelow);
slider->setTickInterval(TICKINTERVAL);
QObject::connect(slider, SIGNAL(valueChanged(int)), q, SLOT(_k_setSliderParameter(int)));