diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-02-11 23:18:35 +0000 |
commit | d09cfe04b82c1bd0738bca24def1e9c3bfdaaa4b (patch) | |
tree | 3553f876e10d7a30e75c488ede82c4a09db8e03e /src/gui/kernel/qkeysequence.cpp | |
parent | 257cc69bedebf924bcabf0ff24e237b8705260ad (diff) |
QtGui: eradicate Q_FOREACH loops [already const]
(or trivially marked const) ... by replacing them
with C++11 range-for loops.
Change-Id: I3cce92b9d77a3ff96fad877d1d989145e530646f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qkeysequence.cpp')
-rw-r--r-- | src/gui/kernel/qkeysequence.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index c23dbbb3be..8a6eeb4cc9 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -1565,9 +1565,9 @@ QList<QKeySequence> QKeySequence::listFromString(const QString &str, SequenceFor { QList<QKeySequence> result; - QStringList strings = str.split(QLatin1String("; ")); + const QStringList strings = str.split(QLatin1String("; ")); result.reserve(strings.count()); - foreach (const QString &string, strings) { + for (const QString &string : strings) { result << fromString(string, format); } @@ -1586,7 +1586,7 @@ QString QKeySequence::listToString(const QList<QKeySequence> &list, SequenceForm { QString result; - foreach (const QKeySequence &sequence, list) { + for (const QKeySequence &sequence : list) { result += sequence.toString(format); result += QLatin1String("; "); } |