diff options
author | Samuel Gaist <samuel.gaist@idiap.ch> | 2018-12-30 15:00:36 +0100 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@idiap.ch> | 2019-01-03 11:38:04 +0000 |
commit | e3332ee38d27a134cef6621fdaf36687af1b6f4a (patch) | |
tree | f4a61fbf2b445846593c4f2718d5a9422294c581 | |
parent | 53ac8dc53bf52b8ef65e71c0532191dd49cc7490 (diff) |
Migrate publish susbscribe to QRegularExpression
This patch updates the publish subscribe code to use QRegularExpression
in place of QRegExp which is to be considered deprecated.
Task-number: QTBUG-72593
Change-Id: I2459feae6a86447134a6c76cf846c116c8927c28
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/imports/publishsubscribe/qdeclarativevaluespacepublisher.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/publishsubscribe/qdeclarativevaluespacepublisher.cpp b/src/imports/publishsubscribe/qdeclarativevaluespacepublisher.cpp index deeb6fd3..a72502ee 100644 --- a/src/imports/publishsubscribe/qdeclarativevaluespacepublisher.cpp +++ b/src/imports/publishsubscribe/qdeclarativevaluespacepublisher.cpp @@ -39,7 +39,7 @@ #include "qdeclarativevaluespacepublisher_p.h" #include "qdeclarativevaluespacepublishermetaobject_p.h" -#include <QtCore/qregexp.h> +#include <QtCore/qregularexpression.h> QT_BEGIN_NAMESPACE @@ -170,7 +170,7 @@ bool QDeclarativeValueSpacePublisher::hasSubscribers() const void QDeclarativeValueSpacePublisher::setKeys(const QStringList &keys) { foreach (const QString &key, keys) { - if (key.contains(QRegExp(QString(QStringLiteral("[^a-zA-Z0-9]")))) + if (key.contains(QRegularExpression(QStringLiteral("[^a-zA-Z0-9]"))) || key == QString(QStringLiteral("value")) || key == QString(QStringLiteral("path")) || key == QString(QStringLiteral("keys")) |