[libkwinglutils] Fix regression in OpenGL version parsing
QByteArray seems to not like a truncate or left with -1. Reviewed-By: Rohan Garg
This commit is contained in:
parent
f6ef9e8d8c
commit
bcf76c0d2f
1 changed files with 4 additions and 1 deletions
|
@ -112,7 +112,10 @@ void initGL(OpenGLPlatformInterface platformInterface)
|
|||
if (glversionstring.startsWith("OpenGL ES ")) {
|
||||
glversionstring = glversionstring.mid(10);
|
||||
}
|
||||
glversionstring.truncate(glversionstring.indexOf(' '));
|
||||
const int whiteSpaceIndex = glversionstring.indexOf(' ');
|
||||
if (whiteSpaceIndex != -1) {
|
||||
glversionstring.truncate(whiteSpaceIndex);
|
||||
}
|
||||
auto glversioninfo = glversionstring.split('.');
|
||||
while (glversioninfo.count() < 3)
|
||||
glversioninfo << "0";
|
||||
|
|
Loading…
Reference in a new issue