eglfs: Make sure there is a platform window for the backing store

Some example code creates the backing store before the platform window.
Make this case working by calling create().

Task-number: QTBUG-43543
Change-Id: I29c260f38eddd15ea09931e814c5dbd031b65505
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
bb10
Laszlo Agocs 2015-01-05 16:30:28 +01:00
parent 5b4f875e12
commit ccef8261d4
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ QPlatformFontDatabase *QEGLPlatformIntegration::fontDatabase() const
QPlatformBackingStore *QEGLPlatformIntegration::createPlatformBackingStore(QWindow *window) const
{
QOpenGLCompositorBackingStore *bs = new QOpenGLCompositorBackingStore(window);
if (!window->handle())
window->create();
static_cast<QEGLPlatformWindow *>(window->handle())->setBackingStore(bs);
return bs;
}