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/evdevmouse/qevdevmousehandler.cpp | |
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/evdevmouse/qevdevmousehandler.cpp')
-rw-r--r-- | src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp index abf3e75348..a8b7bbe19b 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp +++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp @@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + Q_LOGGING_CATEGORY(qLcEvdevMouse, "qt.qpa.input") std::unique_ptr<QEvdevMouseHandler> QEvdevMouseHandler::create(const QString &device, const QString &specification) @@ -77,13 +79,13 @@ std::unique_ptr<QEvdevMouseHandler> QEvdevMouseHandler::create(const QString &de const auto args = QStringView{specification}.split(u':'); for (const auto &arg : args) { - if (arg == QLatin1String("nocompress")) + if (arg == "nocompress"_L1) compression = false; - else if (arg.startsWith(QLatin1String("dejitter="))) + else if (arg.startsWith("dejitter="_L1)) jitterLimit = arg.mid(9).toInt(); - else if (arg.startsWith(QLatin1String("grab="))) + else if (arg.startsWith("grab="_L1)) grab = arg.mid(5).toInt(); - else if (arg == QLatin1String("abs")) + else if (arg == "abs"_L1) abs = true; } @@ -101,7 +103,7 @@ std::unique_ptr<QEvdevMouseHandler> QEvdevMouseHandler::create(const QString &de QEvdevMouseHandler::QEvdevMouseHandler(const QString &device, int fd, bool abs, bool compression, int jitterLimit) : m_device(device), m_fd(fd), m_abs(abs), m_compression(compression) { - setObjectName(QLatin1String("Evdev Mouse Handler")); + setObjectName("Evdev Mouse Handler"_L1); m_jitterLimitSquared = jitterLimit * jitterLimit; |