diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-13 11:42:38 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-05-04 10:00:35 +0200 |
commit | ceaa7d6341e666f6fe0d071ea34cad9877961a0e (patch) | |
tree | 7280a74e2e0e498720dcd141ac4f759df766a669 /src/plugins/platforms/qnx | |
parent | 5020d1b22a31f5fe45287547037c57fa5aeb06d7 (diff) |
Plugins: use _L1 for for creating Latin-1 string literals
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.
Task-number: QTBUG-98434
Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r-- | src/plugins/platforms/qnx/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.cpp | 12 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnativeinterface.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp | 6 |
4 files changed, 17 insertions, 9 deletions
diff --git a/src/plugins/platforms/qnx/main.cpp b/src/plugins/platforms/qnx/main.cpp index b5869fa603..1a2f20a689 100644 --- a/src/plugins/platforms/qnx/main.cpp +++ b/src/plugins/platforms/qnx/main.cpp @@ -43,9 +43,11 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QPlatformIntegration *QQnxIntegrationPlugin::create(const QString& system, const QStringList& paramList) { - if (!system.compare(QLatin1String("qnx"), Qt::CaseInsensitive)) { + if (!system.compare("qnx"_L1, Qt::CaseInsensitive)) { qqnxLgmonInit(); return new QQnxIntegration(paramList); } diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 02eafadae8..a09de65a94 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -106,24 +106,26 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QQnxIntegration *QQnxIntegration::ms_instance; static inline QQnxIntegration::Options parseOptions(const QStringList ¶mList) { QQnxIntegration::Options options = QQnxIntegration::NoOptions; - if (!paramList.contains(QLatin1String("no-fullscreen"))) { + if (!paramList.contains("no-fullscreen"_L1)) { options |= QQnxIntegration::FullScreenApplication; } - if (paramList.contains(QLatin1String("flush-screen-context"))) { + if (paramList.contains("flush-screen-context"_L1)) { options |= QQnxIntegration::AlwaysFlushScreenContext; } - if (paramList.contains(QLatin1String("rootwindow"))) { + if (paramList.contains("rootwindow"_L1)) { options |= QQnxIntegration::RootWindow; } - if (!paramList.contains(QLatin1String("disable-EGL_KHR_surfaceless_context"))) { + if (!paramList.contains("disable-EGL_KHR_surfaceless_context"_L1)) { options |= QQnxIntegration::SurfacelessEGLContext; } @@ -570,7 +572,7 @@ static bool getRequestedDisplays(QJsonArray &requestedDisplays) // Read the requested display order const QJsonObject object = doc.object(); - requestedDisplays = object.value(QLatin1String("displayOrder")).toArray(); + requestedDisplays = object.value("displayOrder"_L1).toArray(); return true; } diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp index ed83e2a958..dd2e9c662d 100644 --- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp +++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp @@ -60,6 +60,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QQnxNativeInterface::QQnxNativeInterface(QQnxIntegration *integration) : m_integration(integration) { @@ -116,7 +118,7 @@ void QQnxNativeInterface::setWindowProperty(QPlatformWindow *window, const QStri { QQnxWindow *qnxWindow = static_cast<QQnxWindow*>(window); - if (name == QLatin1String("qnxWindowGroup")) { + if (name == "qnxWindowGroup"_L1) { if (value.isNull()) qnxWindow->joinWindowGroup(QByteArray()); else if (value.canConvert<QByteArray>()) diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index 84cfbea27d..8341ecd872 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -136,6 +136,8 @@ static void finishCloseEvent(screen_event_t event) QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QQnxScreenEventHandler::QQnxScreenEventHandler(QQnxIntegration *integration) : m_qnxIntegration(integration) , m_lastButtonState(Qt::NoButton) @@ -147,7 +149,7 @@ QQnxScreenEventHandler::QQnxScreenEventHandler(QQnxIntegration *integration) { // Create a touch device m_touchDevice = new QPointingDevice( - QLatin1String("touchscreen"), 1, QInputDevice::DeviceType::TouchScreen, + "touchscreen"_L1, 1, QInputDevice::DeviceType::TouchScreen, QPointingDevice::PointerType::Finger, QPointingDevice::Capability::Position | QPointingDevice::Capability::Area | QPointingDevice::Capability::Pressure @@ -155,7 +157,7 @@ QQnxScreenEventHandler::QQnxScreenEventHandler(QQnxIntegration *integration) MaximumTouchPoints, 8); QWindowSystemInterface::registerInputDevice(m_touchDevice); - m_mouseDevice = new QPointingDevice(QLatin1String("mouse"), 2, QInputDevice::DeviceType::Mouse, + m_mouseDevice = new QPointingDevice("mouse"_L1, 2, QInputDevice::DeviceType::Mouse, QPointingDevice::PointerType::Generic, QPointingDevice::Capability::Position, 1, 8); QWindowSystemInterface::registerInputDevice(m_mouseDevice); |