summaryrefslogtreecommitdiffstats
path: root/src/plugins/winrt/qwinrtcameracontrol.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-02-15 14:52:31 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-02-28 07:13:18 +0000
commit1df2974e0c30c34cf3c458c9c89047fe9685b84d (patch)
treee310acb098ee2f6edadd6c4da8ab1a8c5f9c0926 /src/plugins/winrt/qwinrtcameracontrol.cpp
parent0354fdda8b430f7749082ca55ad6c1dc781f3918 (diff)
Replace deprecated qSort() by std::sort()
Change-Id: I74ffd5bafaef9ebbe7f12600ad831c8deb58ae64 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/winrt/qwinrtcameracontrol.cpp')
-rw-r--r--src/plugins/winrt/qwinrtcameracontrol.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/winrt/qwinrtcameracontrol.cpp b/src/plugins/winrt/qwinrtcameracontrol.cpp
index 4c515bc3d..0086e92e9 100644
--- a/src/plugins/winrt/qwinrtcameracontrol.cpp
+++ b/src/plugins/winrt/qwinrtcameracontrol.cpp
@@ -62,6 +62,8 @@
#include <windows.storage.streams.h>
#include <windows.media.devices.h>
+#include <algorithm>
+
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
using namespace ABI::Windows::Devices::Enumeration;
@@ -1416,9 +1418,8 @@ HRESULT QWinRTCameraControl::onInitializationCompleted(IAsyncAction *, AsyncStat
if (qAbs(aspectRatio - captureAspectRatio) <= ASPECTRATIO_EPSILON)
filtered.append(resolution);
}
- qSort(filtered.begin(),
- filtered.end(),
- [](QSize size1, QSize size2) { return size1.width() * size1.height() < size2.width() * size2.height(); });
+ std::sort(filtered.begin(), filtered.end(),
+ [](QSize size1, QSize size2) { return size1.width() * size1.height() < size2.width() * size2.height(); });
const QSize &viewfinderResolution = filtered.first();
const quint32 viewfinderResolutionIndex = previewResolutions.indexOf(viewfinderResolution);