kernel/qplatformopenglcontext.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4class QPlatformOpenGLContextPrivate -
5{ -
6public: -
7 QPlatformOpenGLContextPrivate() : context(0) {}
never executed: }
0
8 -
9 QOpenGLContext *context; -
10}; -
11 -
12QPlatformOpenGLContext::QPlatformOpenGLContext() -
13 : d_ptr(new QPlatformOpenGLContextPrivate) -
14{ -
15}
never executed: }
0
16 -
17QPlatformOpenGLContext::~QPlatformOpenGLContext() -
18{ -
19} -
20 -
21 -
22 -
23 -
24 -
25 -
26GLuint QPlatformOpenGLContext::defaultFramebufferObject(QPlatformSurface *) const -
27{ -
28 return 0;
never executed: return 0;
0
29} -
30 -
31QOpenGLContext *QPlatformOpenGLContext::context() const -
32{ -
33 const QPlatformOpenGLContextPrivate * const d = d_func(); -
34 return d->context;
never executed: return d->context;
0
35} -
36 -
37void QPlatformOpenGLContext::setContext(QOpenGLContext *context) -
38{ -
39 QPlatformOpenGLContextPrivate * const d = d_func(); -
40 d->context = context; -
41}
never executed: }
0
42 -
43bool QPlatformOpenGLContext::parseOpenGLVersion(const QByteArray &versionString, int &major, int &minor) -
44{ -
45 bool majorOk = false; -
46 bool minorOk = false; -
47 QList<QByteArray> parts = versionString.split(' '); -
48 if (versionString.startsWith(QByteArray("OpenGL ES", sizeof("OpenGL ES") - 1))) {
never evaluated: versionString.startsWith(QByteArray("OpenGL ES", sizeof("OpenGL ES") - 1))
0
49 if (parts.size() >= 3) {
never evaluated: parts.size() >= 3
0
50 QList<QByteArray> versionParts = parts.at(2).split('.'); -
51 if (versionParts.size() >= 2) {
never evaluated: versionParts.size() >= 2
0
52 major = versionParts.at(0).toInt(&majorOk); -
53 minor = versionParts.at(1).toInt(&minorOk); -
54 } else {
never executed: }
0
55 QMessageLogger("kernel/qplatformopenglcontext.cpp", 133, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL ES version"); -
56 }
never executed: }
0
57 } else { -
58 -
59 QMessageLogger("kernel/qplatformopenglcontext.cpp", 137, __PRETTY_FUNCTION__).warning("Unrecognised OpenGL ES version"); -
60 }
never executed: }
0
61 } else { -
62 -
63 QList<QByteArray> versionParts = parts.at(0).split('.'); -
64 if (versionParts.size() >= 2) {
never evaluated: versionParts.size() >= 2
0
65 major = versionParts.at(0).toInt(&majorOk); -
66 minor = versionParts.at(1).toInt(&minorOk); -
67 } else {
never executed: }
0
68 QMessageLogger("kernel/qplatformopenglcontext.cpp", 146, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL version"); -
69 }
never executed: }
0
70 } -
71 -
72 if (!majorOk || !minorOk)
never evaluated: !majorOk
never evaluated: !minorOk
0
73 QMessageLogger("kernel/qplatformopenglcontext.cpp", 151, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL version");
never executed: QMessageLogger("kernel/qplatformopenglcontext.cpp", 151, __PRETTY_FUNCTION__).warning("Unrecognized OpenGL version");
0
74 return (majorOk && minorOk);
never executed: return (majorOk && minorOk);
0
75} -
76 -
77 -
78 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial