summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index ebc5758d4f..88b816d1b6 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -277,7 +277,18 @@ public:
bool hasAcceptableInput() const { return hasAcceptableInput(m_text); }
bool fixup();
- QString inputMask() const { return m_maskData ? m_inputMask + QLatin1Char(';') + m_blank : QString(); }
+ QString inputMask() const
+ {
+ QString mask;
+ if (m_maskData) {
+ mask = m_inputMask;
+ if (m_blank != QLatin1Char(' ')) {
+ mask += QLatin1Char(';');
+ mask += m_blank;
+ }
+ }
+ return mask;
+ }
void setInputMask(const QString &mask)
{
parseInputMask(mask);