From cf6e5bd61cf0fc9fe4f70f87ad6d1dd59d456d97 Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 28 May 2009 16:31:28 +0200 Subject: Cleaned up the inputMethodHints enum a bit. Made a clear distinction between Exclusive flags and other flags. --- doc/src/qnamespace.qdoc | 2 ++ src/corelib/global/qnamespace.h | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc index 84b3a01..fc0598f 100644 --- a/doc/src/qnamespace.qdoc +++ b/doc/src/qnamespace.qdoc @@ -2412,6 +2412,8 @@ \value ImhNoPredictiveText Do not use predictive text (i.e. dictionary lookup) while typing. \value ImhDialableCharactersOnly Only characters suitable for phone dialling are allowed. + \value ImhExclusiveInputMask A mask to test for the presence of any flags ending with \c Only. + \note If several flags ending with \c Only are ORed together, the resulting character set will consist of the union of the specified sets. For instance specifying \c ImhNumbersOnly and \c ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters. diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index e0ca27c..75524a0 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1401,16 +1401,19 @@ public: enum InputMethodHint { ImhNone = 0x0, ImhHiddenText = 0x1, - ImhDigitsOnly = 0x2, - ImhFormattedNumbersOnly = 0x4, - ImhUppercaseOnly = 0x8, - ImhLowercaseOnly = 0x10, - ImhNoAutoUppercase = 0x20, - ImhPreferNumbers = 0x40, - ImhPreferUppercase = 0x80, - ImhPreferLowercase = 0x100, - ImhNoPredictiveText = 0x200, - ImhDialableCharactersOnly = 0x400 + ImhNoAutoUppercase = 0x2, + ImhPreferNumbers = 0x4, + ImhPreferUppercase = 0x8, + ImhPreferLowercase = 0x10, + ImhNoPredictiveText = 0x20, + + ImhDigitsOnly = 0x10000, + ImhFormattedNumbersOnly = 0x20000, + ImhUppercaseOnly = 0x40000, + ImhLowercaseOnly = 0x80000, + ImhDialableCharactersOnly = 0x100000, + + ImhExclusiveInputMask = 0xffff0000 }; Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint) -- cgit v0.12