Call setSurfaceFormat after QQuiApplication instance initiation

The setSurfaceFormat function calls QOpenGLContext::openGLModuleType
function which can only be called after QQuiApplication istance is
initiated.

Task-number: QTBUG-60617
Change-Id: I7cbf48f325de9c3cbbb5d8addb78bf55ae1b5d07
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Määttä Antti 2017-05-08 09:26:44 +03:00 committed by Jani Heikkinen
parent b9908909c9
commit c0f12806a2
2 changed files with 2 additions and 2 deletions

View File

@ -71,8 +71,8 @@ void setSurfaceFormat()
int main(int argc, char **argv)
{
setSurfaceFormat();
QGuiApplication app(argc, argv);
setSurfaceFormat();
QQuickView view;

View File

@ -71,8 +71,8 @@ void setSurfaceFormat()
int main(int argc, char **argv)
{
setSurfaceFormat();
QGuiApplication app(argc, argv);
setSurfaceFormat();
QQuickView view;