summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-05-03 10:18:36 +0200
committerLars Knoll <lars.knoll@nokia.com>2012-05-03 12:26:09 +0200
commit1e49914fee099c4c0d634743326b50ad02e6c8f1 (patch)
tree422eedb9ddcb16fa9f5a653737b4c78d8930eeae /src/corelib/kernel/qcoreapplication.cpp
parent1eac22a1b9dad7f843916afa9b7c820aa1c23777 (diff)
parentc0d249019b098890fb8e5e9e144c2dd8029a670c (diff)
Merge remote-tracking branch 'origin/api_changes'
Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 95c80cad20..5d70c4c5d8 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1082,6 +1082,12 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
if (event->type() == QEvent::DeferredDelete && data == QThreadData::current()) {
// remember the current running eventloop for DeferredDelete
// events posted in the receiver's thread
+
+ // check that QEvent's d pointer is unused before we store the loop level
+ // if further updates to QEvent have made the use of the d pointer necessary,
+ // then update this code to store the loop level somewhere else
+ Q_ASSERT_X(event->d == 0, "QCoreApplication::postEvent",
+ "Internal error: this code relies on QEvent::d being null");
event->d = reinterpret_cast<QEventPrivate *>(quintptr(data->loopLevel));
}