diff options
Diffstat (limited to 'src/gui/kernel/qkeysequence.cpp')
-rw-r--r-- | src/gui/kernel/qkeysequence.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 9a75f4bc83..d59bd63caf 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -1211,9 +1211,13 @@ QString QKeySequence::encodeString(int key) static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format) { - if (!str.isEmpty()) - str += (format == QKeySequence::NativeText) ? QCoreApplication::translate("QShortcut", "+") - : QString::fromLatin1("+"); + if (!str.isEmpty()) { + if (format == QKeySequence::NativeText) + str += QCoreApplication::translate("QShortcut", "+"); + else + str += QLatin1Char('+'); + } + str += theKey; } |