Fix gstreamer plugin build for platforms with qreal -> float
authorRomain Pokrzywka <romain.pokrzywka@kdab.com>
Thu, 13 Sep 2012 18:17:23 +0000 (11:17 -0700)
committerQt by Nokia <qt-info@nokia.com>
Fri, 14 Sep 2012 17:29:21 +0000 (19:29 +0200)
simple case of qFuzzyCompare with double and float.
I kept m_volume as double rather than changing it to float, to mimic
the behavior of the mute variable.

Change-Id: Ife2f58f60738215ebd430ba94bef885c09994e72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@gmail.com>
src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp

index 435a413..cc3965e 100644 (file)
@@ -1025,7 +1025,7 @@ void QGstreamerCaptureSession::setMuted(bool muted)
 
 void QGstreamerCaptureSession::setVolume(qreal volume)
 {
-    if (!qFuzzyCompare(volume, m_volume)) {
+    if (!qFuzzyCompare(double(volume), m_volume)) {
         m_volume = volume;
         if (m_audioVolume)
             g_object_set(G_OBJECT(m_audioVolume), "volume", m_volume, NULL);