From 387c063ed615fd3fcdf074202d2cfd3f9f93d609 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Sat, 30 May 2015 10:36:17 +0100 Subject: Use QSet::intersects() instead of QSet::intersect() It's much faster. Change-Id: Iee42359147ebb76b5848f3ac2e17eb92214c8ab6 Reviewed-by: Marc Mutz --- src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp index 7132c29ab..91bfd67f3 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp @@ -252,7 +252,7 @@ void QGstreamerRecorderControl::applySettings() bool found = false; foreach (const QString &audioCandidate, audioCandidates) { QSet audioTypes = audioEncodeControl->supportedStreamTypes(audioCandidate); - if (!audioTypes.intersect(supportedTypes).isEmpty()) { + if (audioTypes.intersects(supportedTypes)) { found = true; audioCodec = audioCandidate; break; @@ -266,7 +266,7 @@ void QGstreamerRecorderControl::applySettings() bool found = false; foreach (const QString &videoCandidate, videoCandidates) { QSet videoTypes = videoEncodeControl->supportedStreamTypes(videoCandidate); - if (!videoTypes.intersect(supportedTypes).isEmpty()) { + if (videoTypes.intersects(supportedTypes)) { found = true; videoCodec = videoCandidate; break; -- cgit v1.2.3