From 483328a956bfb9c8908ebe36e3695fab44384820 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 6 Mar 2015 09:29:56 +0100 Subject: [PATCH] docs: QPlatformWindow::screen() and QWindow::screen() can return null After change f4b8697c40bd476ef6bf83418e144adce7c7d4a3, it is normal on X11 to have a null screen when all outputs have been disconnected or turned off. Change-Id: I97eeefd86d97701be50f0757fe5c53ca36d79aaa Reviewed-by: Harri Porten Reviewed-by: Laszlo Agocs --- src/gui/kernel/qplatformwindow.cpp | 3 ++- src/gui/kernel/qwindow.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index d8e4e7736e..114fcf8062 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -79,7 +79,8 @@ QPlatformWindow *QPlatformWindow::parent() const } /*! - Returns the platform screen handle corresponding to this platform window. + Returns the platform screen handle corresponding to this platform window, + or null if the window is not associated with a screen. */ QPlatformScreen *QPlatformWindow::screen() const { diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 33f0409216..06db4e81fa 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1678,7 +1678,7 @@ bool QWindow::setMouseGrabEnabled(bool grab) } /*! - Returns the screen on which the window is shown. + Returns the screen on which the window is shown, or null if there is none. For child windows, this returns the screen of the corresponding top level window.