Use u' ' instead of QLatin1Char(' ') in qkeysequence.cpp

Easier on the eye.

Amends ada885dfd55d5c386d04039babee43e49ccab5c5.

Pick-to: 6.8
Change-Id: Id218288ccc4556abb7c9a199f27b7dcb6a3ba73e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e9dbc016e133e881ffb4d9994735c15c96699e0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
David Faure 2025-03-12 13:04:15 +01:00 committed by Qt Cherry-pick Bot
parent ba9fa54b92
commit 13aac36f69

View File

@ -1105,7 +1105,7 @@ QKeyCombination QKeySequencePrivate::decodeString(QString accel, QKeySequence::S
qsizetype lastI = 0;
while ((i = sl.indexOf(u'+', i + 1)) != -1) {
QStringView sub = QStringView{ sl }.mid(lastI, i - lastI + 1);
while (sub.size() > 1 && sub.at(0) == QLatin1Char(' ')) {
while (sub.size() > 1 && sub.at(0) == u' ') {
sub = sub.mid(1);
++lastI;
}
@ -1141,7 +1141,7 @@ QKeyCombination QKeySequencePrivate::decodeString(QString accel, QKeySequence::S
if (!validModifier) {
// Try harder with slower code that trims spaces
const QString cleanedSub = sub.toString().remove(QLatin1Char(' '));
const QString cleanedSub = sub.toString().remove(u' ');
validModifier = identifyModifier(cleanedSub);
}
if (!validModifier)
@ -1155,9 +1155,9 @@ QKeyCombination QKeySequencePrivate::decodeString(QString accel, QKeySequence::S
if (p > 0)
accelRef = accelRef.mid(p + 1);
while (accelRef.size() > 1 && accelRef.at(0) == QLatin1Char(' '))
while (accelRef.size() > 1 && accelRef.at(0) == u' ')
accelRef = accelRef.mid(1);
while (accelRef.size() > 1 && accelRef.endsWith(QLatin1Char(' ')))
while (accelRef.size() > 1 && accelRef.endsWith(u' '))
accelRef.chop(1);
int fnum = 0;