Windows QPA: Add warning to setHasBorderInFullScreen()

Emit a warning when the function is called before show()
as it does not have any effect in that case.

Amends change 69839e55c1.

Task-number: QTBUG-41309
Change-Id: I7c2bb21735d8e41d525c5e00213b0e278ae5c774
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
Friedemann Kleint 2016-07-14 15:00:23 +02:00
parent 6bb0bc73c8
commit 9a00ae8e24
1 changed files with 4 additions and 3 deletions

View File

@ -2402,9 +2402,10 @@ void QWindowsWindow::aboutToMakeCurrent()
void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border)
{
if (!window->handle())
return;
static_cast<QWindowsWindow *>(window->handle())->setHasBorderInFullScreen(border);
if (QPlatformWindow *handle = window->handle())
static_cast<QWindowsWindow *>(handle)->setHasBorderInFullScreen(border);
else
qWarning("%s invoked without window handle; call has no effect.", Q_FUNC_INFO);
}
void QWindowsWindow::setHasBorderInFullScreen(bool border)