From 7ca2207ac056fd481751ae6a12de9b0e5da1eb23 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 9 Nov 2012 11:36:01 +0100 Subject: [PATCH] Preparation for changing QWindow::windowState to visibility MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit QQuickWindow needs to avoid depending on QWindowPrivate::visible. It can go back to using private variables after the replacment is done. Change-Id: I38b99df8b4ef0139c9eadcbb07d33d3f1894a8ac Reviewed-by: Samuel Rødal --- src/quick/items/qquickwindow.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index b341c6b..64fea0b 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1996,7 +1996,11 @@ bool QQuickWindowPrivate::isRenderable() const { if (geometry.width() <= 0 || geometry.height() <= 0) return false; - return visible || (renderWithoutShowing && platformWindow); + // Change to be applied after the visibility property is integrated in qtbase: +// return visibility != QWindow::Hidden || (renderWithoutShowing && platformWindow); + // Temporary version which is implementation-agnostic but slightly less efficient: + const QQuickWindow *q = q_func(); + return q->isVisible() || (renderWithoutShowing && platformWindow); } /*! -- 1.7.2.5