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:
parent
31da70ff8e
commit
ef8da487a8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user