summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-11-15 15:02:03 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-15 20:07:17 +0100
commitef8da487a84ef93636220b1ef89b3fc21cca7b49 (patch)
tree643bd9ad5371e8a2ddd0dffa40c6f658205d47c8 /src/gui/kernel/qwindow.cpp
parent31da70ff8e86946475c55fb78d3ff4092d4537de (diff)
Adding a "helper assert" for when you can create QWindow
maybe if your trying to instansiate a QWindow before the QApplication has been instansiated. Change-Id: I68ed4ad1dbdfedc242a7cb27c1381d50a3d3dfa4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index c2a698ef9b..069764e545 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -64,6 +64,11 @@ QWindow::QWindow(QScreen *targetScreen)
d->screen = targetScreen;
if (!d->screen)
d->screen = QGuiApplication::primaryScreen();
+
+ //if your applications aborts here, then chances are your creating a QWindow before the
+ //screen list is populated.
+ Q_ASSERT(d->screen);
+
QGuiApplicationPrivate::window_list.prepend(this);
}