Micro-optimize QKeySequencePrivate::decodeString()
Use a QStringRef instead of a QString. Change-Id: I63bf9775606b071cd9614306375e1316dada9f61 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
parent
3d5612de98
commit
d3cb97172f
@ -1101,7 +1101,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
|
||||
int i = 0;
|
||||
int lastI = 0;
|
||||
while ((i = sl.indexOf(QLatin1Char('+'), i + 1)) != -1) {
|
||||
const QString sub = sl.mid(lastI, i - lastI + 1);
|
||||
const QStringRef sub = sl.midRef(lastI, i - lastI + 1);
|
||||
// If we get here the shortcuts contains at least one '+'. We break up
|
||||
// along the following strategy:
|
||||
// Meta+Ctrl++ ( "Meta+", "Ctrl+", "+" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user