aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-02 09:57:13 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-03 21:01:49 +0200
commit55be24d6b6e66bd54168021f5a467ba4da73b2c6 (patch)
tree07f3165aebbe539dc506e78f1f4040471d32ab62 /tests/auto/qml/debugger
parente1bc9db85149b89feb73f1690fd218de498b8b27 (diff)
Remove QRegExp from qml autotests
QRegExp will get removed in Qt6. Clean up by removing dependencies on QRegExp in the autotests. Change-Id: I8ef8561ba30b98b61cd9ed52907b48c5969f2c49 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger')
-rw-r--r--tests/auto/qml/debugger/shared/qqmldebugprocess.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
index 956e97e7ba..d2ac7f3772 100644
--- a/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
+++ b/tests/auto/qml/debugger/shared/qqmldebugprocess.cpp
@@ -31,6 +31,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
+#include <QtCore/qregularexpression.h>
QQmlDebugProcess::QQmlDebugProcess(const QString &executable, QObject *parent)
: QObject(parent)
@@ -194,9 +195,9 @@ void QQmlDebugProcess::processAppOutput()
m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1);
if (line.contains("QML Debugger:")) {
- const QRegExp portRx("Waiting for connection on port (\\d+)");
- if (portRx.indexIn(line) != -1) {
- m_port = portRx.cap(1).toInt();
+ auto portRx = QRegularExpression("Waiting for connection on port (\\d+)").match(line);
+ if (portRx.hasMatch()) {
+ m_port = portRx.captured(1).toInt();
m_timer.stop();
m_state = SessionStarted;
m_eventLoop.quit();