Prevent windows outside the gui thread in rendercontrol example
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>
Tue, 16 Dec 2014 11:49:08 +0000 (12:49 +0100)
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>
Wed, 7 Jan 2015 12:21:00 +0000 (13:21 +0100)
commitfae16f9d2fca773276eba150d0414fb2f303d179
tree7d657c46028f1e0e0c220414f15a4e01fab425f3
parent5352f67ffa5ee257f2856deb8f5f8cd69108e278
Prevent windows outside the gui thread in rendercontrol example

In the multithreaded case we attempted to create QWindows outside
the gui thread on platforms where QOffscreenSurface is backed by
the hidden QWindow in the absence of a better solution. This has
to be avoided. Therefore, pass a suitable surface from the gui
thread instead.

This will avoid "Attempting to create QWindow-based QOffscreenSurface
outside the gui thread." type of warnings when running on OS X with
--threaded.

Change-Id: Ie3ebeeeaa9e6bdf83e763e40213e2940fbfde667
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
examples/quick/rendercontrol/cuberenderer.cpp
examples/quick/rendercontrol/cuberenderer.h
examples/quick/rendercontrol/window_multithreaded.cpp
examples/quick/rendercontrol/window_singlethreaded.cpp