From 96b872506ac40c3ffb6d0edd643501284643d954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 27 Apr 2011 09:38:54 +0200 Subject: Don't create a platform window if we already have one. (cherry picked from commit c4dea497adc36a0be840a51c9b98177f1f4b65b2) --- src/gui/kernel/qwindow_qpa.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/kernel/qwindow_qpa.cpp b/src/gui/kernel/qwindow_qpa.cpp index ad16179383..f33ff90ad2 100644 --- a/src/gui/kernel/qwindow_qpa.cpp +++ b/src/gui/kernel/qwindow_qpa.cpp @@ -116,7 +116,8 @@ void QWindow::setVisible(bool visible) void QWindow::create() { Q_D(QWindow); - d->platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(this); + if (!d->platformWindow) + d->platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(this); Q_ASSERT(d->platformWindow); } -- cgit v1.2.3