qopenglversionfunctionsfactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglversionfunctionsfactory.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)-
10{-
11-
12 const int major = versionProfile.version().first;-
13 const int minor = versionProfile.version().second;-
14-
15 if (versionProfile.hasProfiles()
versionProfile.hasProfiles()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
16 switch (versionProfile.profile()) {-
17 case
never executed: case QSurfaceFormat::CoreProfile:
QSurfaceFormat::CoreProfile:
never executed: case QSurfaceFormat::CoreProfile:
0
18 if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 5
minor == 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
19 return
never executed: return new QOpenGLFunctions_4_5_Core;
new QOpenGLFunctions_4_5_Core;
never executed: return new QOpenGLFunctions_4_5_Core;
0
20 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 4
minor == 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
21 return
never executed: return new QOpenGLFunctions_4_4_Core;
new QOpenGLFunctions_4_4_Core;
never executed: return new QOpenGLFunctions_4_4_Core;
0
22 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 3
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
23 return
never executed: return new QOpenGLFunctions_4_3_Core;
new QOpenGLFunctions_4_3_Core;
never executed: return new QOpenGLFunctions_4_3_Core;
0
24 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 2
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
25 return
never executed: return new QOpenGLFunctions_4_2_Core;
new QOpenGLFunctions_4_2_Core;
never executed: return new QOpenGLFunctions_4_2_Core;
0
26 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 1
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
27 return
never executed: return new QOpenGLFunctions_4_1_Core;
new QOpenGLFunctions_4_1_Core;
never executed: return new QOpenGLFunctions_4_1_Core;
0
28 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 0
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
29 return
never executed: return new QOpenGLFunctions_4_0_Core;
new QOpenGLFunctions_4_0_Core;
never executed: return new QOpenGLFunctions_4_0_Core;
0
30 else if (major == 3
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 3
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
31 return
never executed: return new QOpenGLFunctions_3_3_Core;
new QOpenGLFunctions_3_3_Core;
never executed: return new QOpenGLFunctions_3_3_Core;
0
32 else if (major == 3
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 2
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
33 return
never executed: return new QOpenGLFunctions_3_2_Core;
new QOpenGLFunctions_3_2_Core;
never executed: return new QOpenGLFunctions_3_2_Core;
0
34 break;
never executed: break;
0
35-
36 case
never executed: case QSurfaceFormat::CompatibilityProfile:
QSurfaceFormat::CompatibilityProfile:
never executed: case QSurfaceFormat::CompatibilityProfile:
0
37 if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 5
minor == 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
38 return
never executed: return new QOpenGLFunctions_4_5_Compatibility;
new QOpenGLFunctions_4_5_Compatibility;
never executed: return new QOpenGLFunctions_4_5_Compatibility;
0
39 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 4
minor == 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
40 return
never executed: return new QOpenGLFunctions_4_4_Compatibility;
new QOpenGLFunctions_4_4_Compatibility;
never executed: return new QOpenGLFunctions_4_4_Compatibility;
0
41 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 3
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
42 return
never executed: return new QOpenGLFunctions_4_3_Compatibility;
new QOpenGLFunctions_4_3_Compatibility;
never executed: return new QOpenGLFunctions_4_3_Compatibility;
0
43 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 2
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
44 return
never executed: return new QOpenGLFunctions_4_2_Compatibility;
new QOpenGLFunctions_4_2_Compatibility;
never executed: return new QOpenGLFunctions_4_2_Compatibility;
0
45 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 1
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
46 return
never executed: return new QOpenGLFunctions_4_1_Compatibility;
new QOpenGLFunctions_4_1_Compatibility;
never executed: return new QOpenGLFunctions_4_1_Compatibility;
0
47 else if (major == 4
major == 4Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 0
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
48 return
never executed: return new QOpenGLFunctions_4_0_Compatibility;
new QOpenGLFunctions_4_0_Compatibility;
never executed: return new QOpenGLFunctions_4_0_Compatibility;
0
49 else if (major == 3
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 3
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
50 return
never executed: return new QOpenGLFunctions_3_3_Compatibility;
new QOpenGLFunctions_3_3_Compatibility;
never executed: return new QOpenGLFunctions_3_3_Compatibility;
0
51 else if (major == 3
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 2
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
52 return
never executed: return new QOpenGLFunctions_3_2_Compatibility;
new QOpenGLFunctions_3_2_Compatibility;
never executed: return new QOpenGLFunctions_3_2_Compatibility;
0
53 break;
never executed: break;
0
54-
55 case
never executed: case QSurfaceFormat::NoProfile:
QSurfaceFormat::NoProfile:
never executed: case QSurfaceFormat::NoProfile:
0
56 default
never executed: default:
:
never executed: default:
0
57 break;
never executed: break;
0
58 };-
59 } else {-
60 if (major == 3
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 1
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
61 return
never executed: return new QOpenGLFunctions_3_1;
new QOpenGLFunctions_3_1;
never executed: return new QOpenGLFunctions_3_1;
0
62 else if (major == 3
major == 3Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 0
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
63 return
never executed: return new QOpenGLFunctions_3_0;
new QOpenGLFunctions_3_0;
never executed: return new QOpenGLFunctions_3_0;
0
64 else if (major == 2
major == 2Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 1
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
65 return
never executed: return new QOpenGLFunctions_2_1;
new QOpenGLFunctions_2_1;
never executed: return new QOpenGLFunctions_2_1;
0
66 else if (major == 2
major == 2Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 0
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
67 return
never executed: return new QOpenGLFunctions_2_0;
new QOpenGLFunctions_2_0;
never executed: return new QOpenGLFunctions_2_0;
0
68 else if (major == 1
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 5
minor == 5Description
TRUEnever evaluated
FALSEnever evaluated
)
0
69 return
never executed: return new QOpenGLFunctions_1_5;
new QOpenGLFunctions_1_5;
never executed: return new QOpenGLFunctions_1_5;
0
70 else if (major == 1
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 4
minor == 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
71 return
never executed: return new QOpenGLFunctions_1_4;
new QOpenGLFunctions_1_4;
never executed: return new QOpenGLFunctions_1_4;
0
72 else if (major == 1
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 3
minor == 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
73 return
never executed: return new QOpenGLFunctions_1_3;
new QOpenGLFunctions_1_3;
never executed: return new QOpenGLFunctions_1_3;
0
74 else if (major == 1
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 2
minor == 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
75 return
never executed: return new QOpenGLFunctions_1_2;
new QOpenGLFunctions_1_2;
never executed: return new QOpenGLFunctions_1_2;
0
76 else if (major == 1
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 1
minor == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
77 return
never executed: return new QOpenGLFunctions_1_1;
new QOpenGLFunctions_1_1;
never executed: return new QOpenGLFunctions_1_1;
0
78 else if (major == 1
major == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& minor == 0
minor == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
79 return
never executed: return new QOpenGLFunctions_1_0;
new QOpenGLFunctions_1_0;
never executed: return new QOpenGLFunctions_1_0;
0
80 }
never executed: end of block
0
81 return
never executed: return 0;
0;
never executed: return 0;
0
82-
83-
84-
85-
86}-
87-
88-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9