summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediacapture
diff options
context:
space:
mode:
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);
}