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

Easier on the eye.

Amends ada885dfd55d5c386d04039babee43e49ccab5c5.

Pick-to: 6.9 6.8
Change-Id: Id218288ccc4556abb7c9a199f27b7dcb6a3ba73e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
David Faure 2025-03-12 13:04:15 +01:00 committed by Marc Mutz
parent 6ac40faa80
commit e9dbc016e1

View File

@ -1107,7 +1107,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;
}
@ -1143,7 +1143,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)
@ -1157,9 +1157,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;