summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-06-24 15:26:20 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-06-27 11:12:24 (GMT)
commit2ff9617cd6093a758dddea5ce50d1efd6e98ded8 (patch)
tree51e57e6ff6a25915b67cbd99b25e82be78b6e9a4 /src/gui/kernel/qapplication.cpp
parent9fc7e0ee3ff00c04f9301cbb45de09851cb55fa4 (diff)
downloadQt-2ff9617cd6093a758dddea5ce50d1efd6e98ded8.zip
Qt-2ff9617cd6093a758dddea5ce50d1efd6e98ded8.tar.gz
Qt-2ff9617cd6093a758dddea5ce50d1efd6e98ded8.tar.bz2
Fix event delevery order
Some functions (such as QObject::moveToThread) did not keep the event ordered by priority. And because qUpperBound is used to add events, that mean new events would not be inserted in order. Task-number: QTBUG19637 Change-Id: I38eb9addb1cdd45b8566e000361ac6e5f1f2c2b8 Reviewed-on: http://codereview.qt.nokia.com/733 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> (cherry picked from commit 7eeabcf70db658bca847498f618a94a375c95f5f)
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 3803599..361ec6d 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -1288,8 +1288,8 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis
|| event->type() == QEvent::LanguageChange
|| event->type() == QEvent::UpdateSoftKeys
|| event->type() == QEvent::InputMethod)) {
- for (int i = 0; i < postedEvents->size(); ++i) {
- const QPostEvent &cur = postedEvents->at(i);
+ for (QPostEventList::const_iterator it = postedEvents->constBegin(); it != postedEvents->constEnd(); ++it) {
+ const QPostEvent &cur = *it;
if (cur.receiver != receiver || cur.event == 0 || cur.event->type() != event->type())
continue;
if (cur.event->type() == QEvent::LayoutRequest