Windows: Fix warning about retrieving the handle from non-toplevels.
Change-Id: I967f218c98309e77371717aa16e46995a767caa3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>bb10
parent
bf4a4a106f
commit
89b6e2d704
|
|
@ -346,8 +346,9 @@ public:
|
|||
static HWND getHWNDForWidget(const QWidget *widget)
|
||||
{
|
||||
if (QWindow *window = windowForWidget(widget))
|
||||
return static_cast<HWND> (QGuiApplication::platformNativeInterface()->
|
||||
nativeResourceForWindow(QByteArrayLiteral("handle"), window));
|
||||
if (window->handle())
|
||||
return static_cast<HWND> (QGuiApplication::platformNativeInterface()->
|
||||
nativeResourceForWindow(QByteArrayLiteral("handle"), window));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue