OpenCoverage

qicucodec.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/codecs/qicucodec.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8typedef QList<QTextCodec*>::ConstIterator TextCodecListConstIt;-
9typedef QList<QByteArray>::ConstIterator ByteArrayListConstIt;-
10-
11static void qIcuCodecStateFree(QTextCodec::ConverterState *state)-
12{-
13 ucnv_close_52(static_cast<UConverter *>(state->d));-
14}
executed 14 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
14
15-
16bool qTextCodecNameMatch(const char *n, const char *h)-
17{-
18 return
executed 487726 times by 39 tests: return ucnv_compareNames_52(n, h) == 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
ucnv_compareNames_52(n, h) == 0;
executed 487726 times by 39 tests: return ucnv_compareNames_52(n, h) == 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
487726
19}-
20struct MibToName {-
21 short mib;-
22 short index;-
23};-
24-
25static const MibToName mibToName[] = {-
26 { 3, 0 },-
27 { 4, 9 },-
28 { 5, 20 },-
29 { 6, 31 },-
30 { 7, 42 },-
31 { 8, 53 },-
32 { 9, 64 },-
33 { 10, 75 },-
34 { 11, 86 },-
35 { 12, 97 },-
36 { 13, 108 },-
37 { 16, 120 },-
38 { 17, 134 },-
39 { 18, 144 },-
40 { 30, 151 },-
41 { 36, 160 },-
42 { 37, 167 },-
43 { 38, 179 },-
44 { 39, 186 },-
45 { 40, 198 },-
46 { 57, 212 },-
47 { 81, 223 },-
48 { 82, 234 },-
49 { 84, 245 },-
50 { 85, 256 },-
51 { 104, 267 },-
52 { 105, 279 },-
53 { 106, 295 },-
54 { 109, 301 },-
55 { 110, 313 },-
56 { 111, 325 },-
57 { 113, 337 },-
58 { 114, 341 },-
59 { 1000, 349 },-
60 { 1001, 356 },-
61 { 1011, 363 },-
62 { 1012, 368 },-
63 { 1013, 374 },-
64 { 1014, 383 },-
65 { 1015, 392 },-
66 { 1016, 399 },-
67 { 1017, 406 },-
68 { 1018, 413 },-
69 { 1019, 422 },-
70 { 1020, 431 },-
71 { 2004, 438 },-
72 { 2005, 448 },-
73 { 2009, 472 },-
74 { 2013, 479 },-
75 { 2016, 486 },-
76 { 2024, 495 },-
77 { 2025, 505 },-
78 { 2026, 512 },-
79 { 2027, 517 },-
80 { 2028, 527 },-
81 { 2030, 534 },-
82 { 2033, 541 },-
83 { 2034, 548 },-
84 { 2035, 555 },-
85 { 2037, 562 },-
86 { 2038, 569 },-
87 { 2039, 576 },-
88 { 2040, 583 },-
89 { 2041, 590 },-
90 { 2043, 597 },-
91 { 2011, 604 },-
92 { 2044, 611 },-
93 { 2045, 618 },-
94 { 2010, 624 },-
95 { 2046, 631 },-
96 { 2047, 638 },-
97 { 2048, 645 },-
98 { 2049, 652 },-
99 { 2050, 659 },-
100 { 2051, 666 },-
101 { 2052, 673 },-
102 { 2053, 680 },-
103 { 2054, 687 },-
104 { 2055, 694 },-
105 { 2056, 701 },-
106 { 2062, 708 },-
107 { 2063, 715 },-
108 { 2084, 723 },-
109 { 2085, 730 },-
110 { 2086, 741 },-
111 { 2087, 748 },-
112 { 2088, 755 },-
113 { 2089, 762 },-
114 { 2091, 771 },-
115 { 2092, 780 },-
116 { 2093, 789 },-
117 { 2094, 798 },-
118 { 2095, 807 },-
119 { 2096, 816 },-
120 { 2097, 825 },-
121 { 2098, 834 },-
122 { 2099, 843 },-
123 { 2100, 852 },-
124 { 2101, 861 },-
125 { 2102, 872 },-
126 { 2250, 880 },-
127 { 2251, 893 },-
128 { 2252, 906 },-
129 { 2253, 919 },-
130 { 2254, 932 },-
131 { 2255, 945 },-
132 { 2256, 958 },-
133 { 2257, 971 },-
134 { 2258, 984 },-
135 { 2259, 997 },-
136};-
137int mibToNameSize = sizeof(mibToName)/sizeof(MibToName);-
138-
139static const char mibToNameTable[] =-
140 "US-ASCII\0"-
141 "ISO-8859-1\0"-
142 "ISO-8859-2\0"-
143 "ISO-8859-3\0"-
144 "ISO-8859-4\0"-
145 "ISO-8859-5\0"-
146 "ISO-8859-6\0"-
147 "ISO-8859-7\0"-
148 "ISO-8859-8\0"-
149 "ISO-8859-9\0"-
150 "ISO-8859-10\0"-
151 "ISO-2022-JP-1\0"-
152 "Shift_JIS\0"-
153 "EUC-JP\0"-
154 "US-ASCII\0"-
155 "EUC-KR\0"-
156 "ISO-2022-KR\0"-
157 "EUC-KR\0"-
158 "ISO-2022-JP\0"-
159 "ISO-2022-JP-2\0"-
160 "GB_2312-80\0"-
161 "ISO-8859-6\0"-
162 "ISO-8859-6\0"-
163 "ISO-8859-8\0"-
164 "ISO-8859-8\0"-
165 "ISO-2022-CN\0"-
166 "ISO-2022-CN-EXT\0"-
167 "UTF-8\0"-
168 "ISO-8859-13\0"-
169 "ISO-8859-14\0"-
170 "ISO-8859-15\0"-
171 "GBK\0"-
172 "GB18030\0"-
173 "UTF-16\0"-
174 "UTF-32\0"-
175 "SCSU\0"-
176 "UTF-7\0"-
177 "UTF-16BE\0"-
178 "UTF-16LE\0"-
179 "UTF-16\0"-
180 "CESU-8\0"-
181 "UTF-32\0"-
182 "UTF-32BE\0"-
183 "UTF-32LE\0"-
184 "BOCU-1\0"-
185 "hp-roman8\0"-
186 "Adobe-Standard-Encoding\0"-
187 "IBM850\0"-
188 "IBM862\0"-
189 "IBM-Thai\0"-
190 "Shift_JIS\0"-
191 "GB2312\0"-
192 "Big5\0"-
193 "macintosh\0"-
194 "IBM037\0"-
195 "IBM273\0"-
196 "IBM277\0"-
197 "IBM278\0"-
198 "IBM280\0"-
199 "IBM284\0"-
200 "IBM285\0"-
201 "IBM290\0"-
202 "IBM297\0"-
203 "IBM420\0"-
204 "IBM424\0"-
205 "IBM437\0"-
206 "IBM500\0"-
207 "cp851\0"-
208 "IBM852\0"-
209 "IBM855\0"-
210 "IBM857\0"-
211 "IBM860\0"-
212 "IBM861\0"-
213 "IBM863\0"-
214 "IBM864\0"-
215 "IBM865\0"-
216 "IBM868\0"-
217 "IBM869\0"-
218 "IBM870\0"-
219 "IBM871\0"-
220 "IBM918\0"-
221 "IBM1026\0"-
222 "KOI8-R\0"-
223 "HZ-GB-2312\0"-
224 "IBM866\0"-
225 "IBM775\0"-
226 "KOI8-U\0"-
227 "IBM00858\0"-
228 "IBM01140\0"-
229 "IBM01141\0"-
230 "IBM01142\0"-
231 "IBM01143\0"-
232 "IBM01144\0"-
233 "IBM01145\0"-
234 "IBM01146\0"-
235 "IBM01147\0"-
236 "IBM01148\0"-
237 "IBM01149\0"-
238 "Big5-HKSCS\0"-
239 "IBM1047\0"-
240 "windows-1250\0"-
241 "windows-1251\0"-
242 "windows-1252\0"-
243 "windows-1253\0"-
244 "windows-1254\0"-
245 "windows-1255\0"-
246 "windows-1256\0"-
247 "windows-1257\0"-
248 "windows-1258\0"-
249 "TIS-620\0";-
250-
251static QTextCodec *loadQtCodec(const char *name)-
252{-
253 if (!strcmp(name, "UTF-8")
!strcmp(name, "UTF-8")Description
TRUEevaluated 310 times by 14 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
FALSEevaluated 938 times by 10 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
310-938
254 return
executed 310 times by 14 tests: return new QUtf8Codec;
Executed by:
  • tst_QMimeDatabase
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
new QUtf8Codec;
executed 310 times by 14 tests: return new QUtf8Codec;
Executed by:
  • tst_QMimeDatabase
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
310
255 if (!strcmp(name, "UTF-16")
!strcmp(name, "UTF-16")Description
TRUEevaluated 6 times by 6 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 932 times by 9 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
6-932
256 return
executed 6 times by 6 tests: return new QUtf16Codec;
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
new QUtf16Codec;
executed 6 times by 6 tests: return new QUtf16Codec;
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
6
257 if (!strcmp(name, "ISO-8859-1")
!strcmp(name, "ISO-8859-1")Description
TRUEevaluated 6 times by 6 tests
Evaluated by:
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 926 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
6-926
258 return
executed 6 times by 6 tests: return new QLatin1Codec;
Executed by:
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlStream
new QLatin1Codec;
executed 6 times by 6 tests: return new QLatin1Codec;
Executed by:
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlStream
6
259 if (!strcmp(name, "UTF-16BE")
!strcmp(name, "UTF-16BE")Description
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 923 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
3-923
260 return
executed 3 times by 3 tests: return new QUtf16BECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
new QUtf16BECodec;
executed 3 times by 3 tests: return new QUtf16BECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
3
261 if (!strcmp(name, "UTF-16LE")
!strcmp(name, "UTF-16LE")Description
TRUEevaluated 4 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 919 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
4-919
262 return
executed 4 times by 4 tests: return new QUtf16LECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
new QUtf16LECodec;
executed 4 times by 4 tests: return new QUtf16LECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
4
263 if (!strcmp(name, "UTF-32")
!strcmp(name, "UTF-32")Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 918 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
1-918
264 return
executed 1 time by 1 test: return new QUtf32Codec;
Executed by:
  • tst_QTextCodec
new QUtf32Codec;
executed 1 time by 1 test: return new QUtf32Codec;
Executed by:
  • tst_QTextCodec
1
265 if (!strcmp(name, "UTF-32BE")
!strcmp(name, "UTF-32BE")Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 916 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
2-916
266 return
executed 2 times by 2 tests: return new QUtf32BECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
new QUtf32BECodec;
executed 2 times by 2 tests: return new QUtf32BECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
2
267 if (!strcmp(name, "UTF-32LE")
!strcmp(name, "UTF-32LE")Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 914 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
2-914
268 return
executed 2 times by 2 tests: return new QUtf32LECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
new QUtf32LECodec;
executed 2 times by 2 tests: return new QUtf32LECodec;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
2
269 if (!strcmp(name, "ISO-8859-16")
!strcmp(name, "ISO-8859-16")Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 913 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
|| !strcmp(name, "latin10")
!strcmp(name, "latin10")Description
TRUEnever evaluated
FALSEevaluated 913 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
|| !strcmp(name, "iso-ir-226")
!strcmp(name, "iso-ir-226")Description
TRUEnever evaluated
FALSEevaluated 913 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
0-913
270 return
executed 1 time by 1 test: return new QSimpleTextCodec(13 );
Executed by:
  • tst_QTextCodec
new QSimpleTextCodec(13 );
executed 1 time by 1 test: return new QSimpleTextCodec(13 );
Executed by:
  • tst_QTextCodec
1
271-
272 if (!strcmp(name, "TSCII")
!strcmp(name, "TSCII")Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 912 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
1-912
273 return
executed 1 time by 1 test: return new QTsciiCodec;
Executed by:
  • tst_QTextCodec
new QTsciiCodec;
executed 1 time by 1 test: return new QTsciiCodec;
Executed by:
  • tst_QTextCodec
1
274 if (!qstrnicmp(name, "iscii", 5)
!qstrnicmp(name, "iscii", 5)Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 903 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
9-903
275 return
executed 9 times by 1 test: return QIsciiCodec::create(name);
Executed by:
  • tst_QTextCodec
QIsciiCodec::create(name);
executed 9 times by 1 test: return QIsciiCodec::create(name);
Executed by:
  • tst_QTextCodec
9
276-
277-
278 return
executed 903 times by 7 tests: return 0;
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
0;
executed 903 times by 7 tests: return 0;
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
903
279}-
280-
281-
282QList<QByteArray> QIcuCodec::availableCodecs()-
283{-
284 QList<QByteArray> codecs;-
285 int n = ucnv_countAvailable_52();-
286 for (int i = 0; i < n
i < nDescription
TRUEevaluated 920 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
; ++i) {
4-920
287 const char *name = ucnv_getAvailableName_52(i);-
288-
289 UErrorCode error = U_ZERO_ERROR;-
290 const char *standardName = ucnv_getStandardName_52(name, "MIME", &error);-
291 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEnever evaluated
FALSEevaluated 920 times by 1 test
Evaluated by:
  • tst_QTextCodec
|| !standardName
!standardNameDescription
TRUEevaluated 720 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 200 times by 1 test
Evaluated by:
  • tst_QTextCodec
) {
0-920
292 error = U_ZERO_ERROR;-
293 standardName = ucnv_getStandardName_52(name, "IANA", &error);-
294 }
executed 720 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
720
295 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEnever evaluated
FALSEevaluated 920 times by 1 test
Evaluated by:
  • tst_QTextCodec
)
0-920
296 continue;
never executed: continue;
0
297-
298 error = U_ZERO_ERROR;-
299 int ac = ucnv_countAliases_52(standardName, &error);-
300 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEevaluated 492 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 428 times by 1 test
Evaluated by:
  • tst_QTextCodec
)
428-492
301 continue;
executed 492 times by 1 test: continue;
Executed by:
  • tst_QTextCodec
492
302 for (int j = 0; j < ac
j < acDescription
TRUEevaluated 3216 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 428 times by 1 test
Evaluated by:
  • tst_QTextCodec
; ++j) {
428-3216
303 error = U_ZERO_ERROR;-
304 const char *alias = ucnv_getAlias_52(standardName, j, &error);-
305 if (!U_SUCCESS(error)
!U_SUCCESS(error)Description
TRUEnever evaluated
FALSEevaluated 3216 times by 1 test
Evaluated by:
  • tst_QTextCodec
)
0-3216
306 continue;
never executed: continue;
0
307 codecs += alias;-
308 }
executed 3216 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
3216
309 }
executed 428 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
428
310-
311-
312 codecs += "TSCII";-
313-
314 return
executed 4 times by 1 test: return codecs;
Executed by:
  • tst_QTextCodec
codecs;
executed 4 times by 1 test: return codecs;
Executed by:
  • tst_QTextCodec
4
315}-
316-
317-
318QList<int> QIcuCodec::availableMibs()-
319{-
320 QList<int> mibs;-
321 mibs.reserve(mibToNameSize + 1);-
322 for (int i = 0; i < mibToNameSize
i < mibToNameSizeDescription
TRUEevaluated 220 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
; ++i)
2-220
323 mibs += mibToName[i].mib;
executed 220 times by 1 test: mibs += mibToName[i].mib;
Executed by:
  • tst_QTextCodec
220
324-
325-
326 mibs += 2107;-
327-
328 return
executed 2 times by 1 test: return mibs;
Executed by:
  • tst_QTextCodec
mibs;
executed 2 times by 1 test: return mibs;
Executed by:
  • tst_QTextCodec
2
329}-
330-
331QTextCodec *QIcuCodec::defaultCodecUnlocked()-
332{-
333 QCoreGlobalData *globalData = QCoreGlobalData::instance();-
334 if (!globalData
!globalDataDescription
TRUEnever evaluated
FALSEevaluated 1098 times by 15 tests
Evaluated by:
  • tst_QTextCodec
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
)
0-1098
335 return
never executed: return 0;
0;
never executed: return 0;
0
336 QTextCodec *c = globalData->codecForLocale.loadAcquire();-
337 if (c
cDescription
TRUEnever evaluated
FALSEevaluated 1098 times by 15 tests
Evaluated by:
  • tst_QTextCodec
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
)
0-1098
338 return
never executed: return c;
c;
never executed: return c;
0
339-
340-
341-
342-
343 const char *name = ucnv_getDefaultName_52();-
344-
345 c = codecForNameUnlocked(name);-
346 globalData->codecForLocale.storeRelease(c);-
347 return
executed 1098 times by 15 tests: return c;
Executed by:
  • tst_QTextCodec
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
c;
executed 1098 times by 15 tests: return c;
Executed by:
  • tst_QTextCodec
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
1098
348}-
349-
350-
351QTextCodec *QIcuCodec::codecForNameUnlocked(const char *name)-
352{-
353-
354 if (!qstrcmp(name, "CP949")
!qstrcmp(name, "CP949")Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22446 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
1-22446
355 name = "windows-949";
executed 1 time by 1 test: name = "windows-949";
Executed by:
  • tst_QTextCodec
1
356 else if (!qstrcmp(name, "Apple Roman")
!qstrcmp(name, "Apple Roman")Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22445 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
1-22445
357 name = "macintosh";
executed 1 time by 1 test: name = "macintosh";
Executed by:
  • tst_QTextCodec
1
358-
359 if (!qstrcmp(name, "windows-874-2000")
!qstrcmp(name,...ows-874-2000")Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22432 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
15-22432
360 || !qstrcmp(name, "windows-874")
!qstrcmp(name, "windows-874")Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22417 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
15-22417
361 || !qstrcmp(name, "MS874")
!qstrcmp(name, "MS874")Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22402 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
15-22402
362 || !qstrcmp(name, "x-windows-874")
!qstrcmp(name,...-windows-874")Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22387 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
15-22387
363 || !qstrcmp(name, "ISO 8859-11")
!qstrcmp(name, "ISO 8859-11")Description
TRUEnever evaluated
FALSEevaluated 22387 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
0-22387
364 name = "TIS-620";
executed 60 times by 1 test: name = "TIS-620";
Executed by:
  • tst_QTextCodec
60
365-
366 UErrorCode error = U_ZERO_ERROR;-
367-
368 const char *standardName = ucnv_getStandardName_52(name, "MIME", &error);-
369 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22446 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
|| !standardName
!standardNameDescription
TRUEevaluated 6451 times by 4 tests
Evaluated by:
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 15995 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
) {
1-22446
370 error = U_ZERO_ERROR;-
371 standardName = ucnv_getStandardName_52(name, "IANA", &error);-
372 }
executed 6452 times by 4 tests: end of block
Executed by:
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
6452
373 bool qt_only = false;-
374 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22446 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
|| !standardName
!standardNameDescription
TRUEevaluated 59 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 22387 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
) {
1-22446
375 standardName = name;-
376 qt_only = true;-
377 }
executed 60 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
else {
60
378-
379-
380-
381-
382 if (qstrcmp(standardName, "GB2312") == 0
qstrcmp(standa..."GB2312") == 0Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22355 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
|| qstrcmp(standardName, "GB_2312-80") == 0
qstrcmp(standa...2312-80") == 0Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22330 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
25-22355
383 standardName = "GBK";
executed 57 times by 1 test: standardName = "GBK";
Executed by:
  • tst_QTextCodec
57
384 else if (qstrcmp(standardName, "KSC_5601") == 0
qstrcmp(standa...SC_5601") == 0Description
TRUEevaluated 549 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 21781 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
|| qstrcmp(standardName, "EUC-KR") == 0
qstrcmp(standa..."EUC-KR") == 0Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 21741 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
|| qstrcmp(standardName, "cp1363") == 0
qstrcmp(standa..."cp1363") == 0Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 21723 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
18-21781
385 standardName = "windows-949";
executed 607 times by 1 test: standardName = "windows-949";
Executed by:
  • tst_QTextCodec
607
386 }
executed 22387 times by 52 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
22387
387-
388 QCoreGlobalData *globalData = QCoreGlobalData::instance();-
389 QTextCodecCache *cache = &globalData->codecCache;-
390-
391 QTextCodec *codec;-
392 if (cache
cacheDescription
TRUEevaluated 22447 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
FALSEnever evaluated
) {
0-22447
393 codec = cache->value(standardName);-
394 if (codec
codecDescription
TRUEevaluated 21016 times by 32 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QTextBrowser
  • ...
FALSEevaluated 1431 times by 52 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
)
1431-21016
395 return
executed 21016 times by 32 tests: return codec;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QTextBrowser
  • ...
codec;
executed 21016 times by 32 tests: return codec;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QTextBrowser
  • ...
21016
396 }
executed 1431 times by 52 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
1431
397-
398 for (TextCodecListConstIt it = globalData->allCodecs.constBegin(), cend = globalData->allCodecs.constEnd(); it != cend
it != cendDescription
TRUEevaluated 7991 times by 39 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
FALSEevaluated 1248 times by 24 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
  • tst_selftests - unknown status
; ++it) {
1248-7991
399 QTextCodec *cursor = *it;-
400 if (qTextCodecNameMatch(cursor->name(), standardName)
qTextCodecName... standardName)Description
TRUEevaluated 183 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
FALSEevaluated 7808 times by 10 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
) {
183-7808
401 if (cache
cacheDescription
TRUEevaluated 183 times by 37 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
FALSEnever evaluated
)
0-183
402 cache->insert(standardName, cursor);
executed 183 times by 37 tests: cache->insert(standardName, cursor);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
183
403 return
executed 183 times by 37 tests: return cursor;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
cursor;
executed 183 times by 37 tests: return cursor;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGlobal
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSettings
  • tst_QSidebar
  • ...
183
404 }-
405 QList<QByteArray> aliases = cursor->aliases();-
406 for (ByteArrayListConstIt ait = aliases.constBegin(), acend = aliases.constEnd(); ait != acend
ait != acendDescription
TRUEevaluated 42656 times by 8 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 7808 times by 10 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
; ++ait) {
7808-42656
407 if (qTextCodecNameMatch(*ait, standardName)
qTextCodecName... standardName)Description
TRUEnever evaluated
FALSEevaluated 42656 times by 8 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlStream
) {
0-42656
408 if (cache
cacheDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
409 cache->insert(standardName, cursor);
never executed: cache->insert(standardName, cursor);
0
410 return
never executed: return cursor;
cursor;
never executed: return cursor;
0
411 }-
412 }
executed 42656 times by 8 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlStream
42656
413 }
executed 7808 times by 10 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
7808
414-
415 QTextCodec *c = loadQtCodec(standardName);-
416 if (c
cDescription
TRUEevaluated 345 times by 22 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
FALSEevaluated 903 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
345-903
417 return
executed 345 times by 22 tests: return c;
Executed by:
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
c;
executed 345 times by 22 tests: return c;
Executed by:
  • tst_QMimeDatabase
  • tst_QSettings
  • tst_QString
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_quuid - unknown status
345
418-
419 if (qt_only
qt_onlyDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 891 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
)
12-891
420 return
executed 12 times by 2 tests: return 0;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
0;
executed 12 times by 2 tests: return 0;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
12
421-
422-
423 UConverter *conv = ucnv_open_52(standardName, &error);-
424 if (!conv
!convDescription
TRUEnever evaluated
FALSEevaluated 891 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
) {
0-891
425 QMessageLogger(__FILE__, 530, __PRETTY_FUNCTION__).debug() << "codecForName: ucnv_open failed" << standardName << u_errorName_52(error);-
426 return
never executed: return 0;
0;
never executed: return 0;
0
427 }-
428-
429 ucnv_close_52(conv);-
430-
431-
432 c = new QIcuCodec(standardName);-
433 if (cache
cacheDescription
TRUEevaluated 891 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-891
434 cache->insert(standardName, c);
executed 891 times by 7 tests: cache->insert(standardName, c);
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
891
435 return
executed 891 times by 7 tests: return c;
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
c;
executed 891 times by 7 tests: return c;
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
891
436}-
437-
438-
439QTextCodec *QIcuCodec::codecForMibUnlocked(int mib)-
440{-
441 for (int i = 0; i < mibToNameSize
i < mibToNameSizeDescription
TRUEevaluated 752 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEnever evaluated
; ++i) {
0-752
442 if (mibToName[i].mib == mib
mibToName[i].mib == mibDescription
TRUEevaluated 23 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 729 times by 5 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
)
23-729
443 return
executed 23 times by 5 tests: return codecForNameUnlocked(mibToNameTable + mibToName[i].index);
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
codecForNameUnlocked(mibToNameTable + mibToName[i].index);
executed 23 times by 5 tests: return codecForNameUnlocked(mibToNameTable + mibToName[i].index);
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
23
444 }
executed 729 times by 5 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
729
445-
446 if (mib == 2107
mib == 2107Description
TRUEnever evaluated
FALSEnever evaluated
)
0
447 return
never executed: return codecForNameUnlocked("TSCII");
codecForNameUnlocked("TSCII");
never executed: return codecForNameUnlocked("TSCII");
0
448-
449 return
never executed: return 0;
0;
never executed: return 0;
0
450}-
451-
452-
453QIcuCodec::QIcuCodec(const char *name)-
454 : m_name(name)-
455{-
456}
executed 891 times by 7 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_selftests - unknown status
891
457-
458QIcuCodec::~QIcuCodec()-
459{-
460}-
461-
462UConverter *QIcuCodec::getConverter(QTextCodec::ConverterState *state) const-
463{-
464 UConverter *conv = 0;-
465 if (state
stateDescription
TRUEevaluated 137 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 56265 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
) {
137-56265
466 if (!state->d
!state->dDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 123 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
) {
14-123
467-
468 state->flags |= QTextCodec::FreeFunction;-
469 QTextCodecUnalignedPointer::encode(state->state_data, qIcuCodecStateFree);-
470 UErrorCode error = U_ZERO_ERROR;-
471 state->d = ucnv_open_52(m_name, &error);-
472 ucnv_setSubstChars_52(static_cast<UConverter *>(state->d),-
473 state->flags & QTextCodec::ConvertInvalidToNull ? "\0" : "?", 1, &error);-
474 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEnever evaluated
FALSEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
)
0-14
475 QMessageLogger(__FILE__, 580, __PRETTY_FUNCTION__).debug() << "getConverter(state) ucnv_open failed" << m_name << u_errorName_52(error);
never executed: QMessageLogger(__FILE__, 580, __PRETTY_FUNCTION__).debug() << "getConverter(state) ucnv_open failed" << m_name << u_errorName_52(error);
0
476 }
executed 14 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
14
477 conv = static_cast<UConverter *>(state->d);-
478 }
executed 137 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
137
479 if (!conv
!convDescription
TRUEevaluated 56265 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
FALSEevaluated 137 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
) {
137-56265
480-
481 UErrorCode error = U_ZERO_ERROR;-
482 conv = ucnv_open_52(m_name, &error);-
483 ucnv_setSubstChars_52(conv, "?", 1, &error);-
484 if (U_FAILURE(error)
U_FAILURE(error)Description
TRUEnever evaluated
FALSEevaluated 56265 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
)
0-56265
485 QMessageLogger(__FILE__, 590, __PRETTY_FUNCTION__).debug() << "getConverter(no state) ucnv_open failed" << m_name << u_errorName_52(error);
never executed: QMessageLogger(__FILE__, 590, __PRETTY_FUNCTION__).debug() << "getConverter(no state) ucnv_open failed" << m_name << u_errorName_52(error);
0
486 }
executed 56265 times by 7 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
56265
487 return
executed 56402 times by 9 tests: return conv;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
conv;
executed 56402 times by 9 tests: return conv;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
56402
488}-
489-
490QString QIcuCodec::convertToUnicode(const char *chars, int length, QTextCodec::ConverterState *state) const-
491{-
492 UConverter *conv = getConverter(state);-
493-
494 QString string(length + 2, Qt::Uninitialized);-
495-
496 const char *end = chars + length;-
497 int convertedChars = 0;-
498 while (1) {-
499 UChar *uc = (UChar *)string.data();-
500 UChar *ucEnd = uc + string.length();-
501 uc += convertedChars;-
502 UErrorCode error = U_ZERO_ERROR;-
503 ucnv_toUnicode_52(conv,-
504 &uc, ucEnd,-
505 &chars, end,-
506 0, false, &error);-
507 if (!U_SUCCESS(error)
!U_SUCCESS(error)Description
TRUEnever evaluated
FALSEevaluated 14412 times by 8 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
&& error != U_BUFFER_OVERFLOW_ERROR
error != U_BUF...OVERFLOW_ERRORDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-14412
508 QMessageLogger(__FILE__, 613, __PRETTY_FUNCTION__).debug() << "convertToUnicode failed:" << u_errorName_52(error);-
509 break;
never executed: break;
0
510 }-
511-
512 convertedChars = uc - (UChar *)string.data();-
513 if (chars >= end
chars >= endDescription
TRUEevaluated 14412 times by 8 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-14412
514 break;
executed 14412 times by 8 tests: break;
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
14412
515 string.resize(string.length()*2);-
516 }
never executed: end of block
0
517 string.resize(convertedChars);-
518-
519 if (!state
!stateDescription
TRUEevaluated 14297 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
FALSEevaluated 115 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
)
115-14297
520 ucnv_close_52(conv);
executed 14297 times by 6 tests: ucnv_close_52(conv);
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
14297
521 return
executed 14412 times by 8 tests: return string;
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
string;
executed 14412 times by 8 tests: return string;
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
14412
522}-
523-
524-
525QByteArray QIcuCodec::convertFromUnicode(const QChar *unicode, int length, QTextCodec::ConverterState *state) const-
526{-
527 UConverter *conv = getConverter(state);-
528-
529 int requiredLength = (((int32_t)(length)+10)*(int32_t)(ucnv_getMaxCharSize_52(conv)));-
530 QByteArray string(requiredLength, Qt::Uninitialized);-
531-
532 const UChar *uc = (const UChar *)unicode;-
533 const UChar *end = uc + length;-
534 int convertedChars = 0;-
535 while (1) {-
536 char *ch = (char *)string.data();-
537 char *chEnd = ch + string.length();-
538 ch += convertedChars;-
539 UErrorCode error = U_ZERO_ERROR;-
540 ucnv_fromUnicode_52(conv,-
541 &ch, chEnd,-
542 &uc, end,-
543 0, false, &error);-
544 if (!U_SUCCESS(error)
!U_SUCCESS(error)Description
TRUEnever evaluated
FALSEevaluated 41990 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
)
0-41990
545 QMessageLogger(__FILE__, 650, __PRETTY_FUNCTION__).debug() << "convertFromUnicode failed:" << u_errorName_52(error);
never executed: QMessageLogger(__FILE__, 650, __PRETTY_FUNCTION__).debug() << "convertFromUnicode failed:" << u_errorName_52(error);
0
546 convertedChars = ch - string.data();-
547 if (uc >= end
uc >= endDescription
TRUEevaluated 41990 times by 7 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-41990
548 break;
executed 41990 times by 7 tests: break;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
41990
549 string.resize(string.length()*2);-
550 }
never executed: end of block
0
551 string.resize(convertedChars);-
552-
553 if (!state
!stateDescription
TRUEevaluated 41968 times by 6 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_QXmlStream
)
22-41968
554 ucnv_close_52(conv);
executed 41968 times by 6 tests: ucnv_close_52(conv);
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
41968
555-
556 return
executed 41990 times by 7 tests: return string;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
string;
executed 41990 times by 7 tests: return string;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_qmimedatabase-cache - unknown status
  • tst_qmimedatabase-xml - unknown status
  • tst_selftests - unknown status
41990
557}-
558-
559-
560QByteArray QIcuCodec::name() const-
561{-
562 return
executed 8250 times by 5 tests: return m_name;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
m_name;
executed 8250 times by 5 tests: return m_name;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
8250
563}-
564-
565-
566QList<QByteArray> QIcuCodec::aliases() const-
567{-
568 UErrorCode error = U_ZERO_ERROR;-
569-
570 int n = ucnv_countAliases_52(m_name, &error);-
571-
572 QList<QByteArray> aliases;-
573 for (int i = 0; i < n
i < nDescription
TRUEevaluated 62348 times by 5 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 8244 times by 5 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
; ++i) {
8244-62348
574 const char *a = ucnv_getAlias_52(m_name, i, &error);-
575-
576 if (!a
!aDescription
TRUEnever evaluated
FALSEevaluated 62348 times by 5 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
|| !qstrcmp(a, m_name)
!qstrcmp(a, m_name)Description
TRUEevaluated 8244 times by 5 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 54104 times by 5 tests
Evaluated by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
)
0-62348
577 continue;
executed 8244 times by 5 tests: continue;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
8244
578 aliases += a;-
579 }
executed 54104 times by 5 tests: end of block
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
54104
580-
581 return
executed 8244 times by 5 tests: return aliases;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
aliases;
executed 8244 times by 5 tests: return aliases;
Executed by:
  • tst_QGlobal
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
8244
582}-
583-
584-
585int QIcuCodec::mibEnum() const-
586{-
587 for (int i = 0; i < mibToNameSize
i < mibToNameSizeDescription
TRUEevaluated 437034 times by 4 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 335 times by 1 test
Evaluated by:
  • tst_QTextCodec
; ++i) {
335-437034
588 if (qTextCodecNameMatch(m_name, (mibToNameTable + mibToName[i].index))
qTextCodecName...ame[i].index))Description
TRUEevaluated 5897 times by 4 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 431137 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
)
5897-431137
589 return
executed 5897 times by 4 tests: return mibToName[i].mib;
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
mibToName[i].mib;
executed 5897 times by 4 tests: return mibToName[i].mib;
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
5897
590 }
executed 431137 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
431137
591-
592 return
executed 335 times by 1 test: return 0;
Executed by:
  • tst_QTextCodec
0;
executed 335 times by 1 test: return 0;
Executed by:
  • tst_QTextCodec
335
593}-
594-
595-
Switch to Source codePreprocessed file

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