summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-04-22 16:03:05 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-04-26 18:59:42 +0200
commit436774f15306889f0e43b44f823a1976d3482ef1 (patch)
tree4c4a874cd1be4fc168d5b36d9fe6e0d6c9b1d063 /src/platformsupport
parent12fb2cfa11cb2e0b7deb00025b0f2c6a91519d98 (diff)
Platformsupport: stop using QLatin1Char() for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I58e00618fc8c82fad8d35a66c1d46e459bfc9de6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_static.cpp4
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp2
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp2
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp2
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp2
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp4
-rw-r--r--src/platformsupport/input/shared/qevdevutil.cpp4
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice.cpp6
8 files changed, 13 insertions, 13 deletions
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
index a1575677f5..d4e7ae0122 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_static.cpp
@@ -107,7 +107,7 @@ QStringList QDeviceDiscoveryStatic::scanConnectedDevices()
dir.setPath(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
const auto deviceFiles = dir.entryList();
for (const QString &deviceFile : deviceFiles) {
- QString absoluteFilePath = dir.absolutePath() + QLatin1Char('/') + deviceFile;
+ QString absoluteFilePath = dir.absolutePath() + u'/' + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
}
@@ -118,7 +118,7 @@ QStringList QDeviceDiscoveryStatic::scanConnectedDevices()
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
const auto deviceFiles = dir.entryList();
for (const QString &deviceFile : deviceFiles) {
- QString absoluteFilePath = dir.absolutePath() + QLatin1Char('/') + deviceFile;
+ QString absoluteFilePath = dir.absolutePath() + u'/' + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
}
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
index 1853c2260a..ae961ea7d3 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
@@ -220,7 +220,7 @@ bool QDeviceDiscoveryUDev::checkDeviceType(udev_device *dev)
if ((m_types & Device_Keyboard) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD"), "1") == 0 )) {
const QString capabilities_key = QString::fromUtf8(udev_device_get_sysattr_value(dev, "capabilities/key"));
- const auto val = QStringView{capabilities_key}.split(QLatin1Char(' '), Qt::SkipEmptyParts);
+ const auto val = QStringView{capabilities_key}.split(u' ', Qt::SkipEmptyParts);
if (!val.isEmpty()) {
bool ok;
unsigned long long keys = val.last().toULongLong(&ok, 16);
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
index e1026c5621..5a0fbee6a6 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
@@ -121,7 +121,7 @@ std::unique_ptr<QEvdevKeyboardHandler> QEvdevKeyboardHandler::create(const QStri
bool enableCompose = false;
int grab = 0;
- const auto args = QStringView{specification}.split(QLatin1Char(':'));
+ const auto args = QStringView{specification}.split(u':');
for (const auto &arg : args) {
if (arg.startsWith(QLatin1String("keymap=")))
keymapFile = arg.mid(7).toString();
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
index 7080245d3b..1d4da0d200 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
@@ -124,7 +124,7 @@ void QEvdevKeyboardManager::loadKeymap(const QString &file)
// Restore the default, which is either the built-in keymap or
// the one given in the plugin spec.
QString keymapFromSpec;
- const auto specs = QStringView{m_spec}.split(QLatin1Char(':'));
+ const auto specs = QStringView{m_spec}.split(u':');
for (const auto &arg : specs) {
if (arg.startsWith(QLatin1String("keymap=")))
keymapFromSpec = arg.mid(7).toString();
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
index 80a2e0e8ff..abf3e75348 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
@@ -75,7 +75,7 @@ std::unique_ptr<QEvdevMouseHandler> QEvdevMouseHandler::create(const QString &de
int grab = 0;
bool abs = false;
- const auto args = QStringView{specification}.split(QLatin1Char(':'));
+ const auto args = QStringView{specification}.split(u':');
for (const auto &arg : args) {
if (arg == QLatin1String("nocompress"))
compression = false;
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index a3f6a470be..191a578d9f 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -211,13 +211,13 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const
{
setObjectName(QLatin1String("Evdev Touch Handler"));
- const QStringList args = spec.split(QLatin1Char(':'));
+ 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"))) {
- QString rotateArg = args.at(i).section(QLatin1Char('='), 1, 1);
+ QString rotateArg = args.at(i).section(u'=', 1, 1);
bool ok;
uint argValue = rotateArg.toUInt(&ok);
if (ok) {
diff --git a/src/platformsupport/input/shared/qevdevutil.cpp b/src/platformsupport/input/shared/qevdevutil.cpp
index 4cecb27a64..31afabe56a 100644
--- a/src/platformsupport/input/shared/qevdevutil.cpp
+++ b/src/platformsupport/input/shared/qevdevutil.cpp
@@ -47,7 +47,7 @@ ParsedSpecification parseSpecification(const QString &specification)
{
ParsedSpecification result;
- result.args = QStringView{specification}.split(QLatin1Char(':'));
+ result.args = QStringView{specification}.split(u':');
for (const auto &arg : qAsConst(result.args)) {
if (arg.startsWith(QLatin1String("/dev/"))) {
@@ -55,7 +55,7 @@ ParsedSpecification parseSpecification(const QString &specification)
result.devices.append(arg.toString());
} else {
// build new specification without /dev/ elements
- result.spec += arg + QLatin1Char(':');
+ result.spec += arg + u':';
}
}
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
index 4206b20a83..76be9105d7 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp
+++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
@@ -462,7 +462,7 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
if (plane.possibleCrtcs & (1 << output.crtc_index)) {
output.available_planes.append(plane);
planeListStr.append(QString::number(plane.id));
- planeListStr.append(QLatin1Char(' '));
+ planeListStr.append(u' ');
// Choose the first primary plane that is not already assigned to
// another screen's associated crtc.
@@ -509,9 +509,9 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
if (qEnvironmentVariableIsSet("QT_QPA_EGLFS_KMS_PLANES_FOR_CRTCS")) {
const QString val = qEnvironmentVariable("QT_QPA_EGLFS_KMS_PLANES_FOR_CRTCS");
qCDebug(qLcKmsDebug, "crtc_id:plane_id override list: %s", qPrintable(val));
- const QStringList crtcPlanePairs = val.split(QLatin1Char(':'));
+ const QStringList crtcPlanePairs = val.split(u':');
for (const QString &crtcPlanePair : crtcPlanePairs) {
- const QStringList values = crtcPlanePair.split(QLatin1Char(','));
+ const QStringList values = crtcPlanePair.split(u',');
if (values.count() == 2 && uint(values[0].toInt()) == output.crtc_id) {
uint planeId = values[1].toInt();
for (QKmsPlane &kmsplane : m_planes) {