Add a warning message when a WM_DESTROY not triggered by Qt is received.

Task-number: QTBUG-34503

Change-Id: I7a1e06b34deaf8e595f4986114701480bdcf219c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Friedemann Kleint 2013-11-07 10:38:56 +01:00 committed by The Qt Project
parent 79b975756a
commit f48bc3ef40
2 changed files with 9 additions and 2 deletions

View File

@ -783,9 +783,15 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
case QtWindows::InputMethodCloseCandidateWindowEvent:
// TODO: Release/regrab mouse if a popup has mouse grab.
return false;
case QtWindows::ClipboardEvent:
case QtWindows::DestroyEvent:
if (!platformWindow->testFlag(QWindowsWindow::WithinDestroy)) {
qWarning() << "External WM_DESTROY received for " << platformWindow->window()
<< ", parent: " << platformWindow->window()->parent()
<< ", transient parent: " << platformWindow->window()->transientParent();
}
return false;
case QtWindows::ClipboardEvent:
return false;
case QtWindows::UnknownEvent:
return false;
case QtWindows::AccessibleObjectFromWindowRequest:

View File

@ -929,6 +929,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
QWindowsWindow::~QWindowsWindow()
{
setFlag(WithinDestroy);
#ifndef Q_OS_WINCE
if (testFlag(TouchRegistered))
QWindowsContext::user32dll.unregisterTouchWindow(m_data.hwnd);