diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-05-27 12:32:26 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-06-15 10:43:51 +0200 |
commit | 31828b3d6b658ef69faaee1f4d2a06a701967294 (patch) | |
tree | 4b76dda5f78405a44727cd0038e02d4c9646e205 /src/platformsupport/input/shared | |
parent | dd28aaec6ff062327df7775e976274dc1804dc3f (diff) |
Port platformsupport to QStringView
Task-number: QTBUG-84319
Change-Id: I8032382904bc8481fe0a147ca38f3de9cfb1890f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'src/platformsupport/input/shared')
-rw-r--r-- | src/platformsupport/input/shared/qevdevutil.cpp | 4 | ||||
-rw-r--r-- | src/platformsupport/input/shared/qevdevutil_p.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/platformsupport/input/shared/qevdevutil.cpp b/src/platformsupport/input/shared/qevdevutil.cpp index 74f8bcdc2b..4cecb27a64 100644 --- a/src/platformsupport/input/shared/qevdevutil.cpp +++ b/src/platformsupport/input/shared/qevdevutil.cpp @@ -47,9 +47,9 @@ ParsedSpecification parseSpecification(const QString &specification) { ParsedSpecification result; - result.args = specification.splitRef(QLatin1Char(':')); + result.args = QStringView{specification}.split(QLatin1Char(':')); - for (const QStringRef &arg : qAsConst(result.args)) { + for (const auto &arg : qAsConst(result.args)) { if (arg.startsWith(QLatin1String("/dev/"))) { // if device is specified try to use it result.devices.append(arg.toString()); diff --git a/src/platformsupport/input/shared/qevdevutil_p.h b/src/platformsupport/input/shared/qevdevutil_p.h index 7d0a5af130..d5576f66cd 100644 --- a/src/platformsupport/input/shared/qevdevutil_p.h +++ b/src/platformsupport/input/shared/qevdevutil_p.h @@ -54,7 +54,7 @@ #include <QString> #include <QStringList> #include <QVector> -#include <QStringRef> +#include <QStringView> QT_BEGIN_NAMESPACE @@ -64,7 +64,7 @@ struct ParsedSpecification { QString spec; QStringList devices; - QVector<QStringRef> args; + QVector<QStringView> args; }; ParsedSpecification parseSpecification(const QString &specification); |