summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-07-07 09:39:43 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-07-07 09:54:03 (GMT)
commitf70f321c8b5769476796e2bae540a57b3b62c684 (patch)
treedd6b4cfe816bfcd0b8b881f3fcc72c98ac0ee331 /src
parent53b116be1bbadd416449d9a0104f514139f495c8 (diff)
downloadQt-f70f321c8b5769476796e2bae540a57b3b62c684.zip
Qt-f70f321c8b5769476796e2bae540a57b3b62c684.tar.gz
Qt-f70f321c8b5769476796e2bae540a57b3b62c684.tar.bz2
Make sure we send a ValueChanged event if the spinbox value has changed
Unfortunately the codepath for keyPressEvent does not call updateState, so we have to add the same line in two places. Note that updateState() is only called from mousePressEvent() and mouseMoveEvent(). Task-number: 254053
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp
index 25acd6e..da18d13 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -57,6 +57,9 @@
#include <qpalette.h>
#include <qstylepainter.h>
#include <qdebug.h>
+#ifndef QT_NO_ACCESSIBILITY
+# include <qaccessible.h>
+#endif
#if defined(Q_WS_X11)
#include <limits.h>
@@ -951,6 +954,9 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
d->buttonState = (Keyboard | (up ? Up : Down));
}
stepBy(steps);
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+#endif
return;
}
#ifdef QT_KEYPAD_NAVIGATION
@@ -1548,6 +1554,9 @@ void QAbstractSpinBoxPrivate::updateState(bool up)
spinClickThresholdTimerId = q->startTimer(spinClickThresholdTimerInterval);
buttonState = (up ? (Mouse | Up) : (Mouse | Down));
q->stepBy(up ? 1 : -1);
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::updateAccessibility(q, 0, QAccessible::ValueChanged);
+#endif
}
}