diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-22 16:31:23 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-26 18:59:42 +0200 |
commit | 6df137ca2f770e458231f4548e08ca0192bffaf8 (patch) | |
tree | 444fbc7c0fcb2e6422429f33d051138d6dbfcad2 /src/platformsupport/input/evdevtouch | |
parent | 436774f15306889f0e43b44f823a1976d3482ef1 (diff) |
Platformsupport: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434
Change-Id: I4fa7ca58b4a298e81d35f19b439ed7702bd9700d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevtouch')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 191a578d9f..15474f8089 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -77,6 +77,8 @@ extern "C" { QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + Q_LOGGING_CATEGORY(qLcEvdevTouch, "qt.qpa.input") Q_LOGGING_CATEGORY(qLcEvents, "qt.qpa.input.events") @@ -209,14 +211,14 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const , m_mtdev(nullptr) #endif { - setObjectName(QLatin1String("Evdev Touch Handler")); + setObjectName("Evdev Touch Handler"_L1); const QStringList args = spec.split(u':'); int rotationAngle = 0; bool invertx = false; bool inverty = false; for (int i = 0; i < args.count(); ++i) { - if (args.at(i).startsWith(QLatin1String("rotate"))) { + if (args.at(i).startsWith("rotate"_L1)) { QString rotateArg = args.at(i).section(u'=', 1, 1); bool ok; uint argValue = rotateArg.toUInt(&ok); @@ -230,9 +232,9 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const break; } } - } else if (args.at(i) == QLatin1String("invertx")) { + } else if (args.at(i) == "invertx"_L1) { invertx = true; - } else if (args.at(i) == QLatin1String("inverty")) { + } else if (args.at(i) == "inverty"_L1) { inverty = true; } } @@ -323,7 +325,7 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const } // Fix up the coordinate ranges for am335x in case the kernel driver does not have them fixed. - if (d->hw_name == QLatin1String("ti-tsc")) { + if (d->hw_name == "ti-tsc"_L1) { if (d->hw_range_x_min == 0 && d->hw_range_x_max == 4095) { d->hw_range_x_min = 165; d->hw_range_x_max = 4016; |