diff options
-rw-r--r-- | dist/changes-4.7.2 | 8 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/dist/changes-4.7.2 b/dist/changes-4.7.2 index 49bdd8e..a18a237 100644 --- a/dist/changes-4.7.2 +++ b/dist/changes-4.7.2 @@ -45,8 +45,12 @@ QtCore QtGui ----- - - foo - * bar + - QWidget + * [QTMOBILITY-645] Send WinIdChange event when winId is set to zero. + The window handle of a native widget may be set to zero in two + situations: (i) temporarily, during reparenting and (ii) during + widget destruction. Previously, no WinIdChange event was sent in + either of these cases; now, it is sent in both cases. QtDBus ------ diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index e22ec55..cbf4886 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1673,13 +1673,8 @@ void QWidgetPrivate::setWinId(WId id) // set widget identifier } if(oldWinId != id) { - // Do not emit an event when the old winId is destroyed. This only - // happens (a) during widget destruction, and (b) immediately prior - // to creation of a new winId, for example as a result of re-parenting. - if(id != 0) { - QEvent e(QEvent::WinIdChange); - QCoreApplication::sendEvent(q, &e); - } + QEvent e(QEvent::WinIdChange); + QCoreApplication::sendEvent(q, &e); } } |