diff options
Diffstat (limited to 'src/platformsupport/devicediscovery')
-rw-r--r-- | src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp index b2e16a409a..f601a196ca 100644 --- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp +++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp @@ -215,8 +215,8 @@ bool QDeviceDiscoveryUDev::checkDeviceType(udev_device *dev) return false; if ((m_types & Device_Keyboard) && (qstrcmp(udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD"), "1") == 0 )) { - const char *capabilities_key = udev_device_get_sysattr_value(dev, "capabilities/key"); - QStringList val = QString::fromUtf8(capabilities_key).split(QLatin1Char(' '), QString::SkipEmptyParts); + const QString capabilities_key = QString::fromUtf8(udev_device_get_sysattr_value(dev, "capabilities/key")); + const auto val = capabilities_key.splitRef(QLatin1Char(' '), QString::SkipEmptyParts); if (!val.isEmpty()) { bool ok; unsigned long long keys = val.last().toULongLong(&ok, 16); |