From 62d9398a27a14098e15094b52dd4f0c72bf5cc23 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 11 Jun 2015 14:03:21 +0200 Subject: QCameraViewFinderSettings: make op== transitive Using qFuzzyCompare in operator== makes it impossible to create a consistent qHash() overload for the class later on (qFuzzyCompare is not transitive). It is unlikely that there will be numerical instability for frame rates. If there is, qFuzzyCompare should be overloaded for either this class or the FrameRateRange class. Change-Id: Id975ea410b373e2987da160504f7618a8c498b5c Reviewed-by: Lars Knoll --- src/multimedia/camera/qcameraviewfindersettings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/multimedia/camera/qcameraviewfindersettings.cpp b/src/multimedia/camera/qcameraviewfindersettings.cpp index 059c93f6a..a92ee65ad 100644 --- a/src/multimedia/camera/qcameraviewfindersettings.cpp +++ b/src/multimedia/camera/qcameraviewfindersettings.cpp @@ -149,8 +149,8 @@ bool operator==(const QCameraViewfinderSettings &lhs, const QCameraViewfinderSet return (lhs.d == rhs.d) || (lhs.d->isNull == rhs.d->isNull && lhs.d->resolution == rhs.d->resolution && - qFuzzyCompare(lhs.d->minimumFrameRate, rhs.d->minimumFrameRate) && - qFuzzyCompare(lhs.d->maximumFrameRate, rhs.d->maximumFrameRate) && + lhs.d->minimumFrameRate == rhs.d->minimumFrameRate && + lhs.d->maximumFrameRate == rhs.d->maximumFrameRate && lhs.d->pixelFormat == rhs.d->pixelFormat && lhs.d->pixelAspectRatio == rhs.d->pixelAspectRatio); } -- cgit v1.2.3