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/vnc | |
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/vnc')
-rw-r--r-- | src/plugins/platforms/vnc/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/vnc/qvncintegration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/vnc/qvncscreen.cpp | 8 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/plugins/platforms/vnc/main.cpp b/src/plugins/platforms/vnc/main.cpp index ac7e18e03f..37de190a10 100644 --- a/src/plugins/platforms/vnc/main.cpp +++ b/src/plugins/platforms/vnc/main.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + class QVncIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT @@ -53,7 +55,7 @@ public: QPlatformIntegration* QVncIntegrationPlugin::create(const QString& system, const QStringList& paramList) { - if (!system.compare(QLatin1String("vnc"), Qt::CaseInsensitive)) + if (!system.compare("vnc"_L1, Qt::CaseInsensitive)) return new QVncIntegration(paramList); return nullptr; diff --git a/src/plugins/platforms/vnc/qvncintegration.cpp b/src/plugins/platforms/vnc/qvncintegration.cpp index e6586ebfa6..04bc644878 100644 --- a/src/plugins/platforms/vnc/qvncintegration.cpp +++ b/src/plugins/platforms/vnc/qvncintegration.cpp @@ -58,11 +58,13 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QVncIntegration::QVncIntegration(const QStringList ¶mList) : m_fontDb(new QGenericUnixFontDatabase), m_services(new QGenericUnixServices) { - QRegularExpression portRx(QLatin1String("port=(\\d+)")); + QRegularExpression portRx("port=(\\d+)"_L1); quint16 port = 5900; for (const QString &arg : paramList) { QRegularExpressionMatch match; diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp index f3d711e5c9..432132bdf5 100644 --- a/src/plugins/platforms/vnc/qvncscreen.cpp +++ b/src/plugins/platforms/vnc/qvncscreen.cpp @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QVncScreen::QVncScreen(const QStringList &args) : mArgs(args) @@ -66,9 +68,9 @@ QVncScreen::~QVncScreen() bool QVncScreen::initialize() { - QRegularExpression sizeRx(QLatin1String("size=(\\d+)x(\\d+)")); - QRegularExpression mmSizeRx(QLatin1String("mmsize=(?<width>(\\d*\\.)?\\d+)x(?<height>(\\d*\\.)?\\d+)")); - QRegularExpression depthRx(QLatin1String("depth=(\\d+)")); + QRegularExpression sizeRx("size=(\\d+)x(\\d+)"_L1); + QRegularExpression mmSizeRx("mmsize=(?<width>(\\d*\\.)?\\d+)x(?<height>(\\d*\\.)?\\d+)"_L1); + QRegularExpression depthRx("depth=(\\d+)"_L1); mGeometry = QRect(0, 0, 1024, 768); mFormat = QImage::Format_ARGB32_Premultiplied; |