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>
This commit is contained in:
Jørgen Lind 2011-11-15 15:02:03 +01:00 committed by Qt by Nokia
parent 31da70ff8e
commit ef8da487a8

View File

@ -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);
}