summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediacapture
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-06-11 11:36:54 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-06-11 14:56:56 +0200
commitb38bcac27dd0c7f8845b4f947a0f631edc0bd33d (patch)
tree5653a4bac1deef9978c17c50c69819224eea1a4e /src/plugins/gstreamer/mediacapture
parentba2f42c2548a5175126497d2d69eef95c2a849ba (diff)
Qt6: Port QtMultimedia from QStringRef to QStringView
Task-number: QTBUG-84319 Change-Id: Ic342142dd17591159ee84139157e5ed613b03682 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/gstreamer/mediacapture')
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp
index ae2b0201..120c19af 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp
@@ -82,7 +82,7 @@ int QGstreamerImageCaptureControl::capture(const QString &fileName)
QDir outputDir = QDir::currentPath();
const auto list = outputDir.entryList(QStringList() << "img_*.jpg");
for (const QString &fileName : list) {
- int imgNumber = fileName.midRef(4, fileName.size()-8).toInt();
+ int imgNumber = QStringView{fileName}.mid(4, fileName.size()-8).toInt();
lastImage = qMax(lastImage, imgNumber);
}
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
index 640f659b..d7f4ec03 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
@@ -359,7 +359,7 @@ QString QGstreamerRecorderControl::generateFileName(const QDir &dir, const QStri
int lastClip = 0;
const auto list = dir.entryList(QStringList() << QString("clip_*.%1").arg(ext));
for (const QString &fileName : list) {
- int imgNumber = fileName.midRef(5, fileName.size()-6-ext.length()).toInt();
+ int imgNumber = QStringView{fileName}.mid(5, fileName.size()-6-ext.length()).toInt();
lastClip = qMax(lastClip, imgNumber);
}