summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qabstractspinbox.cpp
diff options
context:
space:
mode:
authorSven Pauli <sven_pauli@gmx.de>2018-01-01 10:24:58 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-03-05 20:22:09 +0000
commit5ddaadaa7e1f1344b7ebfc479c9893ca36cf32c9 (patch)
tree7088ea36b3813de488793a567cf51e4266858043 /src/widgets/widgets/qabstractspinbox.cpp
parent5155a357cb571542d3d7796f40bbfb839a989062 (diff)
QAbstractSpinBox: respond to QEvent::LocaleChange
Add a branch for QEvent::LocaleChange to the QAbstractSpinBox::event() handler to call updateEdit(). This will update the edit in case the locale's number features changed (decimal separator etc.). Task-number: QTBUG-65315 Change-Id: I9015b3a5bbe8e7b80f7bafa13f0f431507bc4cf7 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qabstractspinbox.cpp')
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index 7ca47e9f0f..8dbae25dce 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -828,6 +828,9 @@ void QAbstractSpinBox::changeEvent(QEvent *event)
d->reset();
d->updateEditFieldGeometry();
break;
+ case QEvent::LocaleChange:
+ d->updateEdit();
+ break;
case QEvent::EnabledChange:
if (!isEnabled()) {
d->reset();