Fix warnings about calling nativeResource when no handle exists.
Triggered for example by Qt Designer's new form dialog. Change-Id: I63a1f1e5425e8d5fc60c10418a715143e65443f1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
parent
13a1e7a444
commit
ac864956f8
@ -190,6 +190,8 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QPlatformNativeInterface *platform = QGuiApplication::platformNativeInterface();
|
QPlatformNativeInterface *platform = QGuiApplication::platformNativeInterface();
|
||||||
|
if (!window->handle()) // Called before show(), no native window yet.
|
||||||
|
return;
|
||||||
HWND hWnd = (HWND)platform->nativeResourceForWindow("handle", window);
|
HWND hWnd = (HWND)platform->nativeResourceForWindow("handle", window);
|
||||||
|
|
||||||
static int eventNum = 0;
|
static int eventNum = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user