summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@idiap.ch>2018-12-02 14:02:28 +0100
committerSamuel Gaist <samuel.gaist@idiap.ch>2018-12-03 15:06:35 +0000
commit0a4366a16dfda251a4c2edf619f846cde8ad9f8a (patch)
tree2477a1f4158ac6a4157700e488b2098bd3570982 /src
parenta88d0ea41e5aab406e9d465a5165fc16fb9ca9fb (diff)
QQmlNdefRecord: port to QRegularExpression
This patch updates the QQmlNdefRecord code to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: Ibfbab39ca84f9e89d6f6bd2e15000359a4218234 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/nfc/qqmlndefrecord.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nfc/qqmlndefrecord.cpp b/src/nfc/qqmlndefrecord.cpp
index a7304f00..bc3667fe 100644
--- a/src/nfc/qqmlndefrecord.cpp
+++ b/src/nfc/qqmlndefrecord.cpp
@@ -40,7 +40,7 @@
#include "qqmlndefrecord.h"
#include <QtCore/QMap>
-#include <QtCore/QRegExp>
+#include <QtCore/QRegularExpression>
#include <QtCore/qglobalstatic.h>
@@ -219,8 +219,8 @@ QQmlNdefRecord *qNewDeclarativeNdefRecordForNdefRecord(const QNdefRecord &record
while (i.hasNext()) {
i.next();
- QRegExp ex(i.key());
- if (!ex.exactMatch(urn))
+ QRegularExpression rx(QRegularExpression::anchoredPattern(i.key()));
+ if (!rx.match(urn).hasMatch())
continue;
const QMetaObject *metaObject = i.value();