QEvdevTouchScreenData: use string view types more

Change-Id: I28b3a8f48bf99cc87d2fdea9a370fce62a233959
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Anton Kudryavtsev 2023-08-17 14:06:39 +03:00
parent b601ea7f8b
commit ace5ec8179

View File

@ -150,12 +150,12 @@ QEvdevTouchScreenData::QEvdevTouchScreenData(QEvdevTouchScreenHandler *q_ptr, co
m_filtered(false), m_prediction(0)
{
for (const QString &arg : args) {
if (arg == QStringLiteral("force_window"))
if (arg == u"force_window")
m_forceToActiveWindow = true;
else if (arg == QStringLiteral("filtered"))
else if (arg == u"filtered")
m_filtered = true;
else if (arg.startsWith(QStringLiteral("prediction=")))
m_prediction = arg.mid(11).toInt();
else if (const QStringView prefix = u"prediction="; arg.startsWith(prefix))
m_prediction = QStringView(arg).mid(prefix.size()).toInt();
}
}