summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgetlinecontrol.cpp
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2019-12-02 10:44:40 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2019-12-10 09:36:24 +0100
commit95689c645fb42260d920091658b2d39c920abf00 (patch)
treed5381531025977bf463ac54c018c237dd90e4264 /src/widgets/widgets/qwidgetlinecontrol.cpp
parentc69a2448ab129d88411a4778f2350dcf971dc623 (diff)
Make inputmask 'X' mask character require non-blank input
The implementation for the X mask would accept any printable character. Since that includes the blank character, there was no difference in behavior between the requiring X and optional x: both would allow the input to be unset, i.e. blank. This change should be seen in conjunction with the doc improvement da0af1e. [ChangeLog][QtWidgets][QLineEdit] Inputmask X character now requires non-blank input. Fixes: QTBUG-76320 Change-Id: I3e0363e9be5c13373a157cce69c99379615b5829 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol.cpp')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index a242947c11..9dd61c2c6a 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -1090,7 +1090,7 @@ bool QWidgetLineControl::isValidInput(QChar key, QChar mask) const
return true;
break;
case 'X':
- if (key.isPrint())
+ if (key.isPrint() && key != m_blank)
return true;
break;
case 'x':