OpenCoverage

qsgshadersourcebuilder.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6namespace QSGShaderParser {-
7-
8struct Tokenizer {-
9-
10 enum Token {-
11 Token_Invalid,-
12 Token_Void,-
13 Token_OpenBrace,-
14 Token_CloseBrace,-
15 Token_SemiColon,-
16 Token_Identifier,-
17 Token_Macro,-
18 Token_Version,-
19 Token_Extension,-
20 Token_SingleLineComment,-
21 Token_MultiLineCommentStart,-
22 Token_MultiLineCommentEnd,-
23 Token_NewLine,-
24 Token_Unspecified,-
25 Token_EOF-
26 };-
27-
28 static const char *NAMES[];-
29-
30 void initialize(const char *input);-
31 Token next();-
32-
33 const char *stream;-
34 const char *pos;-
35 const char *identifier;-
36};-
37-
38const char *Tokenizer::NAMES[] = {-
39 "Invalid",-
40 "Void",-
41 "OpenBrace",-
42 "CloseBrace",-
43 "SemiColon",-
44 "Identifier",-
45 "Macro",-
46 "Version",-
47 "Extension",-
48 "SingleLineComment",-
49 "MultiLineCommentStart",-
50 "MultiLineCommentEnd",-
51 "NewLine",-
52 "Unspecified",-
53 "EOF"-
54};-
55-
56void Tokenizer::initialize(const char *input)-
57{-
58 stream = input;-
59 pos = input;-
60 identifier = input;-
61}
executed 76 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
76
62-
63Tokenizer::Token Tokenizer::next()-
64{-
65 while (*
*pos != 0Description
TRUEevaluated 18122 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
pos != 0
*pos != 0Description
TRUEevaluated 18122 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) {
0-18122
66 char c = *pos++;-
67 switch (c) {-
68 case
executed 532 times by 3 tests: case '/':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
'/':
executed 532 times by 3 tests: case '/':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
532
69 if (*
*pos == '/'Description
TRUEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == '/'
*pos == '/'Description
TRUEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) {
266
70-
71 return
executed 266 times by 3 tests: return Token_SingleLineComment;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_SingleLineComment;
executed 266 times by 3 tests: return Token_SingleLineComment;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
266
72 } else if (*
*pos == '*'Description
TRUEnever evaluated
FALSEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == '*'
*pos == '*'Description
TRUEnever evaluated
FALSEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) {
0-266
73-
74 return
never executed: return Token_MultiLineCommentStart;
Token_MultiLineCommentStart;
never executed: return Token_MultiLineCommentStart;
0
75 }-
76 break;
executed 266 times by 3 tests: break;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
266
77-
78 case
never executed: case '*':
'*':
never executed: case '*':
0
79 if (*
*pos == '/'Description
TRUEnever evaluated
FALSEnever evaluated
pos == '/'
*pos == '/'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
80 return
never executed: return Token_MultiLineCommentEnd;
Token_MultiLineCommentEnd;
never executed: return Token_MultiLineCommentEnd;
0
81 (void)0;-
82-
83 case
executed 1710 times by 3 tests: case '\n':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
code before this statement never executed: case '\n':
executed 1710 times by 3 tests: case '\n':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
'\n':
code before this statement never executed: case '\n':
executed 1710 times by 3 tests: case '\n':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
0-1710
84 return
executed 1710 times by 3 tests: return Token_NewLine;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_NewLine;
executed 1710 times by 3 tests: return Token_NewLine;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1710
85-
86 case
never executed: case '\r':
'\r':
never executed: case '\r':
0
87 if (*
*pos == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
pos == '\n'
*pos == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
88 return
never executed: return Token_NewLine;
Token_NewLine;
never executed: return Token_NewLine;
0
89 (void)0;-
90-
91 case
executed 1098 times by 3 tests: case '#':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
code before this statement never executed: case '#':
executed 1098 times by 3 tests: case '#':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
'#':
code before this statement never executed: case '#':
executed 1098 times by 3 tests: case '#':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
{
0-1098
92 if (*
*pos == 'v'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1022 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == 'v'
*pos == 'v'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1022 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& pos[1] == 'e'
pos[1] == 'e'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& pos[2] == 'r'
pos[2] == 'r'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& pos[3] == 's'
pos[3] == 's'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
0-1022
93 && pos[4] == 'i'
pos[4] == 'i'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& pos[5] == 'o'
pos[5] == 'o'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& pos[6] == 'n'
pos[6] == 'n'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) {
0-76
94 return
executed 76 times by 3 tests: return Token_Version;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_Version;
executed 76 times by 3 tests: return Token_Version;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
76
95 } else if (*
*pos == 'e'Description
TRUEevaluated 570 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 452 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == 'e'
*pos == 'e'Description
TRUEevaluated 570 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 452 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& pos[1] == 'x'
pos[1] == 'x'Description
TRUEnever evaluated
FALSEevaluated 570 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& pos[2] == 't'
pos[2] == 't'Description
TRUEnever evaluated
FALSEnever evaluated
&& pos[3] == 'e'
pos[3] == 'e'Description
TRUEnever evaluated
FALSEnever evaluated
0-570
96 && pos[4] == 'n'
pos[4] == 'n'Description
TRUEnever evaluated
FALSEnever evaluated
&& pos[5] == 's'
pos[5] == 's'Description
TRUEnever evaluated
FALSEnever evaluated
&& pos[6] == 'i'
pos[6] == 'i'Description
TRUEnever evaluated
FALSEnever evaluated
&& pos[7] == 'o'
pos[7] == 'o'Description
TRUEnever evaluated
FALSEnever evaluated
0
97 && pos[8] == 'n'
pos[8] == 'n'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
98 return
never executed: return Token_Extension;
Token_Extension;
never executed: return Token_Extension;
0
99 } else {-
100 while (*
*pos != 0Description
TRUEevaluated 12460 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
pos != 0
*pos != 0Description
TRUEevaluated 12460 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) {
0-12460
101 if (*
*pos == '\n'Description
TRUEevaluated 1022 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 11438 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == '\n'
*pos == '\n'Description
TRUEevaluated 1022 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 11438 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) {
1022-11438
102 ++pos;-
103 break;
executed 1022 times by 3 tests: break;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1022
104 } else if (*
*pos == '\\'Description
TRUEnever evaluated
FALSEevaluated 11438 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == '\\'
*pos == '\\'Description
TRUEnever evaluated
FALSEevaluated 11438 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) {
0-11438
105 ++pos;-
106 while (*
*pos != 0Description
TRUEnever evaluated
FALSEnever evaluated
pos != 0
*pos != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
*pos == ' 'Description
TRUEnever evaluated
FALSEnever evaluated
pos == ' '
*pos == ' 'Description
TRUEnever evaluated
FALSEnever evaluated
|| *
*pos == '\t'Description
TRUEnever evaluated
FALSEnever evaluated
pos == '\t'
*pos == '\t'Description
TRUEnever evaluated
FALSEnever evaluated
))
0
107 ++
never executed: ++pos;
pos;
never executed: ++pos;
0
108 if (*
*pos != 0Description
TRUEnever evaluated
FALSEnever evaluated
pos != 0
*pos != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& (*
*pos == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
pos == '\n'
*pos == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
|| (*
*pos == '\r'Description
TRUEnever evaluated
FALSEnever evaluated
pos == '\r'
*pos == '\r'Description
TRUEnever evaluated
FALSEnever evaluated
&& pos[1] == '\n'
pos[1] == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
)))
0
109 pos+=2;
never executed: pos+=2;
0
110 }
never executed: end of block
else {
0
111 ++pos;-
112 }
executed 11438 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
11438
113 }-
114 }
executed 1022 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1022
115 break;
executed 1022 times by 3 tests: break;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1022
116 }-
117-
118 case
executed 1064 times by 3 tests: case ';':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
';':
executed 1064 times by 3 tests: case ';':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1064
119 return
executed 1064 times by 3 tests: return Token_SemiColon;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_SemiColon;
executed 1064 times by 3 tests: return Token_SemiColon;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1064
120-
121 case
never executed: case 0:
0:
never executed: case 0:
0
122 return
never executed: return Token_EOF;
Token_EOF;
never executed: return Token_EOF;
0
123-
124 case
never executed: case '{':
'{':
never executed: case '{':
0
125 return
never executed: return Token_OpenBrace;
Token_OpenBrace;
never executed: return Token_OpenBrace;
0
126-
127 case
never executed: case '}':
'}':
never executed: case '}':
0
128 return
never executed: return Token_CloseBrace;
Token_CloseBrace;
never executed: return Token_CloseBrace;
0
129-
130 case
executed 5700 times by 3 tests: case ' ':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
' ':
executed 5700 times by 3 tests: case ' ':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
5700
131 break;
executed 5700 times by 3 tests: break;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
5700
132-
133 case
executed 1672 times by 3 tests: case 'v':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
'v':
executed 1672 times by 3 tests: case 'v':
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
{
1672
134 if (*
*pos == 'o'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1596 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == 'o'
*pos == 'o'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1596 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& pos[1] == 'i'
pos[1] == 'i'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& pos[2] == 'd'
pos[2] == 'd'Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) {
0-1596
135 pos += 3;-
136 return
executed 76 times by 3 tests: return Token_Void;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_Void;
executed 76 times by 3 tests: return Token_Void;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
76
137 }-
138 (void)0;-
139 }-
140 default
executed 7942 times by 3 tests: default:
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
:
executed 7942 times by 3 tests: default:
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
code before this statement executed 1596 times by 3 tests: default:
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1596-7942
141-
142 if ((c >= 'a'
c >= 'a'Description
TRUEevaluated 6232 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1710 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& c <= 'z'
c <= 'z'Description
TRUEevaluated 6232 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) || (c >= 'A'
c >= 'A'Description
TRUEevaluated 228 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1482 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& c <= 'Z'
c <= 'Z'Description
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 190 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) || c == '_'
c == '_'Description
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1634 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) {
0-6232
143 identifier = pos - 1;-
144 while (*
*pos != 0Description
TRUEevaluated 33516 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
pos != 0
*pos != 0Description
TRUEevaluated 33516 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& ((*
*pos >= 'a'Description
TRUEevaluated 25194 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 8322 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos >= 'a'
*pos >= 'a'Description
TRUEevaluated 25194 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 8322 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& *
*pos <= 'z'Description
TRUEevaluated 25194 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
pos <= 'z'
*pos <= 'z'Description
TRUEevaluated 25194 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
)
0-33516
145 || (*
*pos >= 'A'Description
TRUEevaluated 1330 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 6992 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos >= 'A'
*pos >= 'A'Description
TRUEevaluated 1330 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 6992 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& *
*pos <= 'Z'Description
TRUEevaluated 1140 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 190 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos <= 'Z'
*pos <= 'Z'Description
TRUEevaluated 1140 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 190 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
)
190-6992
146 || *
*pos == '_'Description
TRUEevaluated 114 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 7068 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos == '_'
*pos == '_'Description
TRUEevaluated 114 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 7068 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
114-7068
147 || (*
*pos >= '0'Description
TRUEevaluated 1824 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 5244 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos >= '0'
*pos >= '0'Description
TRUEevaluated 1824 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 5244 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& *
*pos <= '9'Description
TRUEevaluated 760 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1064 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
pos <= '9'
*pos <= '9'Description
TRUEevaluated 760 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1064 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
))) {
760-5244
148 ++pos;-
149 }
executed 27208 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
27208
150 return
executed 6308 times by 3 tests: return Token_Identifier;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_Identifier;
executed 6308 times by 3 tests: return Token_Identifier;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
6308
151 } else {-
152 return
executed 1634 times by 3 tests: return Token_Unspecified;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
Token_Unspecified;
executed 1634 times by 3 tests: return Token_Unspecified;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
1634
153 }-
154 }-
155 }-
156-
157 return
never executed: return Token_Invalid;
Token_Invalid;
never executed: return Token_Invalid;
0
158}-
159-
160}-
161-
162using namespace QSGShaderParser;-
163-
164QSGShaderSourceBuilder::QSGShaderSourceBuilder()-
165{-
166}-
167-
168void QSGShaderSourceBuilder::initializeProgramFromFiles(QOpenGLShaderProgram *program,-
169 const QString &vertexShader,-
170 const QString &fragmentShader)-
171{-
172 ((program) ? static_cast<void>(0) : qt_assert("program", __FILE__, 216));-
173 program->removeAllShaders();-
174-
175 QSGShaderSourceBuilder builder;-
176-
177 builder.appendSourceFile(vertexShader);-
178 program->addCacheableShaderFromSourceCode(QOpenGLShader::Vertex, builder.source());-
179 builder.clear();-
180-
181 builder.appendSourceFile(fragmentShader);-
182 program->addCacheableShaderFromSourceCode(QOpenGLShader::Fragment, builder.source());-
183}
executed 2 times by 1 test: end of block
Executed by:
  • tst_rendernode
2
184-
185QByteArray QSGShaderSourceBuilder::source() const-
186{-
187 return
executed 8969 times by 70 tests: return m_source;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
m_source;
executed 8969 times by 70 tests: return m_source;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
8969
188}-
189-
190void QSGShaderSourceBuilder::clear()-
191{-
192 m_source.clear();-
193}
executed 76 times by 25 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquickitemlayer
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
  • tst_rendernode
76
194-
195void QSGShaderSourceBuilder::appendSource(const QByteArray &source)-
196{-
197 m_source += source;-
198}
never executed: end of block
0
199-
200void QSGShaderSourceBuilder::appendSourceFile(const QString &fileName)-
201{-
202 const QString resolvedFileName = resolveShaderPath(fileName);-
203 QFile f(resolvedFileName);-
204 if (!f.open(QIODevice::ReadOnly | QIODevice::Text)
!f.open(QIODev...ODevice::Text)Description
TRUEnever evaluated
FALSEevaluated 8973 times by 70 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
) {
0-8973
205 QMessageLogger(__FILE__, 249, __PRETTY_FUNCTION__).warning() << "Failed to find shader" << resolvedFileName;-
206 return;
never executed: return;
0
207 }-
208 m_source += f.readAll();-
209}
executed 8973 times by 70 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
8973
210-
211void QSGShaderSourceBuilder::addDefinition(const QByteArray &definition)-
212{-
213 if (definition.isEmpty()
definition.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
)
0-76
214 return;
never executed: return;
0
215-
216 Tokenizer tok;-
217 const char *input = m_source.constData();-
218 tok.initialize(input);-
219-
220-
221 const char *versionPos = nullptr;-
222 const char *extensionPos = nullptr;-
223 bool inSingleLineComment = false;-
224 bool inMultiLineComment = false;-
225 bool foundVersionStart = false;-
226 bool foundExtensionStart = false;-
227-
228 Tokenizer::Token lt = Tokenizer::Token_Unspecified;-
229 Tokenizer::Token t = tok.next();-
230 while (t != Tokenizer::Token_EOF
t != Tokenizer::Token_EOFDescription
TRUEevaluated 11134 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) {
0-11134
231-
232 if (t == Tokenizer::Token_MultiLineCommentStart
t == Tokenizer...neCommentStartDescription
TRUEnever evaluated
FALSEevaluated 11134 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
)
0-11134
233 inMultiLineComment = true;
never executed: inMultiLineComment = true;
0
234 if (t == Tokenizer::Token_MultiLineCommentEnd
t == Tokenizer...LineCommentEndDescription
TRUEnever evaluated
FALSEevaluated 11134 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
)
0-11134
235 inMultiLineComment = false;
never executed: inMultiLineComment = false;
0
236 if (t == Tokenizer::Token_SingleLineComment
t == Tokenizer...gleLineCommentDescription
TRUEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 10868 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
)
266-10868
237 inSingleLineComment = true;
executed 266 times by 3 tests: inSingleLineComment = true;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
266
238 if (t == Tokenizer::Token_NewLine
t == Tokenizer::Token_NewLineDescription
TRUEevaluated 1710 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 9424 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& inSingleLineComment
inSingleLineCommentDescription
TRUEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 1444 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& !inMultiLineComment
!inMultiLineCommentDescription
TRUEevaluated 266 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
)
0-9424
239 inSingleLineComment = false;
executed 266 times by 3 tests: inSingleLineComment = false;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
266
240-
241-
242 if (t == Tokenizer::Token_Version
t == Tokenizer::Token_VersionDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 11058 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& !inSingleLineComment
!inSingleLineCommentDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
&& !inMultiLineComment
!inMultiLineCommentDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
)
0-11058
243 foundVersionStart = true;
executed 76 times by 3 tests: foundVersionStart = true;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
76
244-
245 if (t == Tokenizer::Token_Extension
t == Tokenizer...oken_ExtensionDescription
TRUEnever evaluated
FALSEevaluated 11134 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& !inSingleLineComment
!inSingleLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
&& !inMultiLineComment
!inMultiLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-11134
246 foundExtensionStart = true;
never executed: foundExtensionStart = true;
0
247-
248 if (foundVersionStart
foundVersionStartDescription
TRUEevaluated 456 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 10678 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& t == Tokenizer::Token_NewLine
t == Tokenizer::Token_NewLineDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 380 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
) {
76-10678
249 versionPos = tok.pos;-
250 foundVersionStart = false;-
251 }
executed 76 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
else if (foundExtensionStart
foundExtensionStartDescription
TRUEnever evaluated
FALSEevaluated 11058 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& t == Tokenizer::Token_NewLine
t == Tokenizer::Token_NewLineDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-11058
252 extensionPos = tok.pos;-
253 foundExtensionStart = false;-
254 }
never executed: end of block
else if (lt == Tokenizer::Token_Void
lt == Tokenizer::Token_VoidDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEevaluated 10982 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
&& t == Tokenizer::Token_Identifier
t == Tokenizer...ken_IdentifierDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
) {
0-10982
255 if (qstrncmp("main", tok.identifier, 4) == 0
qstrncmp("main...ifier, 4) == 0Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
)
0-76
256 break;
executed 76 times by 3 tests: break;
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
76
257 }
never executed: end of block
0
258-
259-
260 lt = t;-
261 t = tok.next();-
262 }
executed 11058 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
11058
263-
264-
265-
266-
267-
268 const char *insertionPos = extensionPos
extensionPosDescription
TRUEnever evaluated
FALSEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
? extensionPos : (versionPos
versionPosDescription
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
FALSEnever evaluated
? versionPos : input);
0-76
269-
270-
271 QByteArray newSource = QByteArray::fromRawData(input, insertionPos - input)-
272 + "#define " + definition + '\n'-
273 + QByteArray::fromRawData(insertionPos, m_source.size() - (insertionPos - input));-
274 m_source = std::move(newSource);-
275}
executed 76 times by 3 tests: end of block
Executed by:
  • tst_qquickcustomaffector
  • tst_qquickimageparticle
  • tst_qquickspritegoal
76
276-
277void QSGShaderSourceBuilder::removeVersion()-
278{-
279 Tokenizer tok;-
280 const char *input = m_source.constData();-
281 tok.initialize(input);-
282-
283-
284 const char *versionStartPos = nullptr;-
285 const char *versionEndPos = nullptr;-
286 bool inSingleLineComment = false;-
287 bool inMultiLineComment = false;-
288 bool foundVersionStart = false;-
289-
290 Tokenizer::Token lt = Tokenizer::Token_Unspecified;-
291 Tokenizer::Token t = tok.next();-
292 while (t != Tokenizer::Token_EOF
t != Tokenizer::Token_EOFDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
293-
294 if (t == Tokenizer::Token_MultiLineCommentStart
t == Tokenizer...neCommentStartDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
295 inMultiLineComment = true;
never executed: inMultiLineComment = true;
0
296 if (t == Tokenizer::Token_MultiLineCommentEnd
t == Tokenizer...LineCommentEndDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
297 inMultiLineComment = false;
never executed: inMultiLineComment = false;
0
298 if (t == Tokenizer::Token_SingleLineComment
t == Tokenizer...gleLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
299 inSingleLineComment = true;
never executed: inSingleLineComment = true;
0
300 if (t == Tokenizer::Token_NewLine
t == Tokenizer::Token_NewLineDescription
TRUEnever evaluated
FALSEnever evaluated
&& inSingleLineComment
inSingleLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
&& !inMultiLineComment
!inMultiLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
301 inSingleLineComment = false;
never executed: inSingleLineComment = false;
0
302-
303-
304 if (t == Tokenizer::Token_Version
t == Tokenizer::Token_VersionDescription
TRUEnever evaluated
FALSEnever evaluated
&& !inSingleLineComment
!inSingleLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
&& !inMultiLineComment
!inMultiLineCommentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
305 versionStartPos = tok.pos - 1;-
306 foundVersionStart = true;-
307 }
never executed: end of block
else if (foundVersionStart
foundVersionStartDescription
TRUEnever evaluated
FALSEnever evaluated
&& t == Tokenizer::Token_NewLine
t == Tokenizer::Token_NewLineDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
308 versionEndPos = tok.pos;-
309 break;
never executed: break;
0
310 } else if (lt == Tokenizer::Token_Void
lt == Tokenizer::Token_VoidDescription
TRUEnever evaluated
FALSEnever evaluated
&& t == Tokenizer::Token_Identifier
t == Tokenizer...ken_IdentifierDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
311 if (qstrncmp("main", tok.identifier, 4) == 0
qstrncmp("main...ifier, 4) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
312 break;
never executed: break;
0
313 }
never executed: end of block
0
314-
315-
316 lt = t;-
317 t = tok.next();-
318 }
never executed: end of block
0
319-
320 if (versionStartPos == nullptr
versionStartPos == nullptrDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
321 return;
never executed: return;
0
322-
323-
324 QByteArray newSource;-
325 newSource.reserve(m_source.size() - (versionEndPos - versionStartPos));-
326 newSource += QByteArray::fromRawData(input, versionStartPos - input);-
327 newSource += QByteArray::fromRawData(versionEndPos, m_source.size() - (versionEndPos - versionStartPos));-
328-
329 m_source = newSource;-
330}
never executed: end of block
0
331-
332QString QSGShaderSourceBuilder::resolveShaderPath(const QString &path) const-
333{-
334 if (contextProfile() != QSurfaceFormat::CoreProfile
contextProfile...t::CoreProfileDescription
TRUEevaluated 8973 times by 70 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
FALSEnever evaluated
) {
0-8973
335 return
executed 8973 times by 70 tests: return path;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
path;
executed 8973 times by 70 tests: return path;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
8973
336 } else {-
337 int idx = path.lastIndexOf(QLatin1Char('.'));-
338 QString resolvedPath;-
339 if (idx != -1
idx != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
340 resolvedPath = path.leftRef(idx)
never executed: resolvedPath = path.leftRef(idx) + QLatin1String("_core") + path.rightRef(path.length() - idx);
0
341 + QLatin1String("_core")
never executed: resolvedPath = path.leftRef(idx) + QLatin1String("_core") + path.rightRef(path.length() - idx);
0
342 + path.rightRef(path.length() - idx);
never executed: resolvedPath = path.leftRef(idx) + QLatin1String("_core") + path.rightRef(path.length() - idx);
0
343 return
never executed: return resolvedPath;
resolvedPath;
never executed: return resolvedPath;
0
344 }-
345}-
346-
347QSurfaceFormat::OpenGLContextProfile QSGShaderSourceBuilder::contextProfile() const-
348{-
349 QOpenGLContext *context = QOpenGLContext::currentContext();-
350 QSurfaceFormat::OpenGLContextProfile profile = QSurfaceFormat::NoProfile;-
351 if (context
contextDescription
TRUEevaluated 8973 times by 70 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
FALSEnever evaluated
)
0-8973
352 profile = context->format().profile();
executed 8973 times by 70 tests: profile = context->format().profile();
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
8973
353 return
executed 8973 times by 70 tests: return profile;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
profile;
executed 8973 times by 70 tests: return profile;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmltypeloader
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdraghandler
  • tst_qquickellipseextruder
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickfontloader
  • tst_qquickfontloader_static
  • tst_qquickframebufferobject
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgridview
  • tst_qquickgroupgoal
  • ...
8973
354}-
355-
356-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0