summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-04-12 06:15:46 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-13 12:27:35 (GMT)
commit90dc28900d3abfb00a65fef1d9daf36e727dfdca (patch)
treee34cfa214f8d6c0d1c691466f514fb1bb9d9c978 /src
parent2af5b76824c21f5b9654d7d9ed8d42a03dd0e2c0 (diff)
downloadQt-90dc28900d3abfb00a65fef1d9daf36e727dfdca.zip
Qt-90dc28900d3abfb00a65fef1d9daf36e727dfdca.tar.gz
Qt-90dc28900d3abfb00a65fef1d9daf36e727dfdca.tar.bz2
Only send progress bar updates when visible.
Screen readers tend to announce progress. Some applications (for example KMail) have hidden progress bars that update frequently. While the applications should be fixed, it's better not to spam the user with continous progress announcements. Change-Id: I5f3b5a83dc80594d995b10e58527115de8601c77 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/qprogressbar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp
index f131d20..ed6ef63 100644
--- a/src/gui/widgets/qprogressbar.cpp
+++ b/src/gui/widgets/qprogressbar.cpp
@@ -315,7 +315,8 @@ void QProgressBar::setValue(int value)
d->value = value;
emit valueChanged(value);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+ if (isVisible())
+ QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
#endif
if (d->repaintRequired())
repaint();