diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2013-04-22 12:11:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-23 12:26:13 +0200 |
commit | 7dd81686e8e9ee86624c5bcca10688cfb360dcb8 (patch) | |
tree | a014b1447b7344d74955400f497948d84c5db147 /src/corelib/global/qnamespace.h | |
parent | f898614b76311c42454f8a1442db9cacda21c35d (diff) |
Fix QKeySequence::toString() returning gibberish for Qt::KeypadModifier
This is the patch from the bug report with a few alterations to get it
to compile, and also with the GroupSwitchModifier code removed, as this patch
just focuses on Qt::KeypadModifier. The problem was determined to be in
QKeySequencePrivate::encodeString, which doesn't handle the
Qt::KeypadModifier flag.
Task-number: QTBUG-4022
Change-Id: Ic981eb8b5cd88c7b36892d3019b8175db4b7b6f2
Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'src/corelib/global/qnamespace.h')
-rw-r--r-- | src/corelib/global/qnamespace.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index f130288a24..95d9baafd5 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -138,6 +138,10 @@ public: Q_DECLARE_FLAGS(KeyboardModifiers, KeyboardModifier) //shorter names for shortcuts + // The use of all-caps identifiers has the potential for clashing with + // user-defined or third-party macros. More so when the identifiers are not + // "namespace"-prefixed. This is considered bad practice and is why + // KeypadModifier was not added to the Modifier enum. enum Modifier { META = Qt::MetaModifier, SHIFT = Qt::ShiftModifier, |