QWindowsOpenGLContextFormat: Default to version 2.

glGetString() returns NULL when no current context exists.

Task-number: QTBUG-38063

Change-Id: I5cdb265fb2d74bbc5f3e2c34528909323573b2e1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Friedemann Kleint 2014-04-08 11:11:20 +02:00 committed by The Qt Project
parent 61541404bc
commit 229c98abf0

View File

@ -711,6 +711,8 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
minorDot = version.size();
result.version = (version.mid(0, majorDot).toInt() << 8)
+ version.mid(majorDot + 1, minorDot - majorDot - 1).toInt();
} else {
result.version = 0x0200;
}
result.profile = QSurfaceFormat::NoProfile;
if (result.version < 0x0300) {