summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-13 11:42:38 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-05-04 10:00:35 +0200
commitceaa7d6341e666f6fe0d071ea34cad9877961a0e (patch)
tree7280a74e2e0e498720dcd141ac4f759df766a669 /src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
parent5020d1b22a31f5fe45287547037c57fa5aeb06d7 (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/linuxfb/qlinuxfbscreen.cpp')
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
index 7467df2b93..ad32ebce70 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp
@@ -65,6 +65,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
static int openFramebufferDevice(const QString &dev)
{
int fd = -1;
@@ -308,11 +310,11 @@ QLinuxFbScreen::~QLinuxFbScreen()
bool QLinuxFbScreen::initialize()
{
- QRegularExpression ttyRx(QLatin1String("tty=(.*)"));
- QRegularExpression fbRx(QLatin1String("fb=(.*)"));
- QRegularExpression mmSizeRx(QLatin1String("mmsize=(\\d+)x(\\d+)"));
- QRegularExpression sizeRx(QLatin1String("size=(\\d+)x(\\d+)"));
- QRegularExpression offsetRx(QLatin1String("offset=(\\d+)x(\\d+)"));
+ QRegularExpression ttyRx("tty=(.*)"_L1);
+ QRegularExpression fbRx("fb=(.*)"_L1);
+ QRegularExpression mmSizeRx("mmsize=(\\d+)x(\\d+)"_L1);
+ QRegularExpression sizeRx("size=(\\d+)x(\\d+)"_L1);
+ QRegularExpression offsetRx("offset=(\\d+)x(\\d+)"_L1);
QString fbDevice, ttyDevice;
QSize userMmSize;
@@ -322,7 +324,7 @@ bool QLinuxFbScreen::initialize()
// Parse arguments
for (const QString &arg : qAsConst(mArgs)) {
QRegularExpressionMatch match;
- if (arg == QLatin1String("nographicsmodeswitch"))
+ if (arg == "nographicsmodeswitch"_L1)
doSwitchToGraphicsMode = false;
else if (arg.contains(mmSizeRx, &match))
userMmSize = QSize(match.captured(1).toInt(), match.captured(2).toInt());
@@ -337,9 +339,9 @@ bool QLinuxFbScreen::initialize()
}
if (fbDevice.isEmpty()) {
- fbDevice = QLatin1String("/dev/fb0");
+ fbDevice = "/dev/fb0"_L1;
if (!QFile::exists(fbDevice))
- fbDevice = QLatin1String("/dev/graphics/fb0");
+ fbDevice = "/dev/graphics/fb0"_L1;
if (!QFile::exists(fbDevice)) {
qWarning("Unable to figure out framebuffer device. Specify it manually.");
return false;