summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-07-14 15:00:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-07-15 09:08:32 +0000
commit9a00ae8e24a03b25476cc6200bddf4c8fc510733 (patch)
tree9a0765fe5121abd86dbe440a7531d8994a036887
parent6bb0bc73c809d1defdcedc31c4c464a129d3de4d (diff)
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 69839e55c13000ee9bf8d8e9d74b70096a92ae51. Task-number: QTBUG-41309 Change-Id: I7c2bb21735d8e41d525c5e00213b0e278ae5c774 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 9c6cb53365..e4888d6b87 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -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)