From 1df2974e0c30c34cf3c458c9c89047fe9685b84d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 15 Feb 2018 14:52:31 +0100 Subject: Replace deprecated qSort() by std::sort() Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff --- src/plugins/gstreamer/camerabin/camerabinsession.cpp | 6 ++++-- src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/plugins/gstreamer') diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp index 823cfe408..39f97e989 100644 --- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp @@ -80,6 +80,8 @@ #include #include +#include + //#define CAMERABIN_DEBUG 1 //#define CAMERABIN_DEBUG_DUMP_BIN 1 #define ENUM_NAME(c,e,v) (c::staticMetaObject.enumerator(c::staticMetaObject.indexOfEnumerator(e)).valueToKey((v))) @@ -1257,7 +1259,7 @@ QList< QPair > CameraBinSession::supportedFrameRates(const QSize &frame readValue(rateValue, &res, continuous); } - qSort(res.begin(), res.end(), rateLessThan); + std::sort(res.begin(), res.end(), rateLessThan); #if CAMERABIN_DEBUG qDebug() << "Supported rates:" << caps; @@ -1384,7 +1386,7 @@ QList CameraBinSession::supportedResolutions(QPair rate, } - qSort(res.begin(), res.end(), resolutionLessThan); + std::sort(res.begin(), res.end(), resolutionLessThan); //if the range is continuos, populate is with the common rates if (isContinuous && res.size() >= 2) { diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp index 9139f1fe2..ef0832f7e 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp @@ -45,6 +45,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE static inline uint qHash(const QSize& key) { return uint(key.width()*256+key.height()); } @@ -252,10 +254,10 @@ void QGstreamerV4L2Input::updateSupportedResolutions(const QByteArray &device) m_frameRates.append(rate/1000.0); } - qSort(m_frameRates); + std::sort(m_frameRates.begin(), m_frameRates.end()); m_resolutions = allResolutions.toList(); - qSort(m_resolutions); + std::sort(m_resolutions.begin(), m_resolutions.end()); //qDebug() << "frame rates:" << m_frameRates; //qDebug() << "resolutions:" << m_resolutions; -- cgit v1.2.3