diff options
author | peterpa <peter.azmanov@gmail.com> | 2011-08-25 15:04:48 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-08-25 15:04:48 +0200 |
commit | e9b3c429337a3ddc144aa1f39d40cd8dd151a566 (patch) | |
tree | b0d93c7c46fb00c5cc104fb0b11072392d7791ac /src/gui/styles | |
parent | 5e473d6d11b831ffab4ae14bc284e6b16be5ce4a (diff) | |
download | qt4-tools-e9b3c429337a3ddc144aa1f39d40cd8dd151a566.tar.gz |
QWindowsStyle: fix bug in eventFilter on KeyPressed event with alt pressed: incorrect work with list
Merge-request: 2664
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qwindowsstyle.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index c0992733f8..9732c7eba9 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -177,11 +177,14 @@ bool QWindowsStyle::eventFilter(QObject *o, QEvent *e) // Alt has been pressed - find all widgets that care QList<QWidget *> l = widget->findChildren<QWidget *>(); - for (int pos=0 ; pos < l.size() ; ++pos) { + for (int pos=0 ; pos < l.size() ;) { QWidget *w = l.at(pos); if (w->isWindow() || !w->isVisible() || - w->style()->styleHint(SH_UnderlineShortcut, 0, w)) + w->style()->styleHint(SH_UnderlineShortcut, 0, w)) { l.removeAt(pos); + continue; + } + pos++; } // Update states before repainting d->seenAlt.append(widget); |