OpenCoverage

qutfcodec.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/codecs/qutfcodec.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include "qutfcodec_p.h"-
42#include "qlist.h"-
43#include "qendian.h"-
44#include "qchar.h"-
45-
46#include "private/qsimd_p.h"-
47#include "private/qstringiterator_p.h"-
48-
49QT_BEGIN_NAMESPACE-
50-
51enum { Endian = 0, Data = 1 };-
52-
53static const uchar utf8bom[] = { 0xef, 0xbb, 0xbf };-
54-
55#if defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)-
56static inline bool simdEncodeAscii(uchar *&dst, const ushort *&nextAscii, const ushort *&src, const ushort *end)-
57{-
58 // do sixteen characters at a time-
59 for ( ; end - src >= 16; src += 16, dst += 16) {
end - src >= 16Description
TRUEevaluated 2394194 times by 391 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
FALSEevaluated 3969456 times by 419 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
2394194-3969456
60 __m128i data1 = _mm_loadu_si128((const __m128i*)src);-
61 __m128i data2 = _mm_loadu_si128(1+(const __m128i*)src);-
62-
63-
64 // check if everything is ASCII-
65 // the highest ASCII value is U+007F-
66 // Do the packing directly:-
67 // The PACKUSWB instruction has packs a signed 16-bit integer to an unsigned 8-bit-
68 // with saturation. That is, anything from 0x0100 to 0x7fff is saturated to 0xff,-
69 // while all negatives (0x8000 to 0xffff) get saturated to 0x00. To detect non-ASCII,-
70 // we simply do a signed greater-than comparison to 0x00. That means we detect NULs as-
71 // "non-ASCII", but it's an acceptable compromise.-
72 __m128i packed = _mm_packus_epi16(data1, data2);-
73 __m128i nonAscii = _mm_cmpgt_epi8(packed, _mm_setzero_si128());-
74-
75 // store, even if there are non-ASCII characters here-
76 _mm_storeu_si128((__m128i*)dst, packed);-
77-
78 // n will contain 1 bit set per character in [data1, data2] that is non-ASCII (or NUL)-
79 ushort n = ~_mm_movemask_epi8(nonAscii);-
80 if (n) {
nDescription
TRUEevaluated 3986 times by 23 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • tst_QStringRef
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlQuery
  • tst_QXmlStream
  • tst_Selftests
  • tst_Utf8
FALSEevaluated 2390208 times by 389 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
3986-2390208
81 // find the next probable ASCII character-
82 // we don't want to load 32 bytes again in this loop if we know there are non-ASCII-
83 // characters still coming-
84 nextAscii = src + _bit_scan_reverse(n) + 1;-
85-
86 n = _bit_scan_forward(n);-
87 dst += n;-
88 src += n;-
89 return false;
executed 3986 times by 23 tests: return false;
Executed by:
  • tst_QDnsLookup
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • tst_QStringRef
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTextStream
  • tst_QUrlQuery
  • tst_QXmlStream
  • tst_Selftests
  • tst_Utf8
3986
90 }-
91 }
executed 2390208 times by 389 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
2390208
92 return src == end;
executed 3969456 times by 419 tests: return src == end;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
3969456
93}-
94-
95static inline bool simdDecodeAscii(ushort *&dst, const uchar *&nextAscii, const uchar *&src, const uchar *end)-
96{-
97 // do sixteen characters at a time-
98 for ( ; end - src >= 16; src += 16, dst += 16) {
end - src >= 16Description
TRUEevaluated 4564301 times by 534 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAuthenticator
  • ...
FALSEevaluated 52293448 times by 569 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
4564301-52293448
99 __m128i data = _mm_loadu_si128((const __m128i*)src);-
100-
101#ifdef __AVX2__-
102 const int BitSpacing = 2;-
103 // load and zero extend to an YMM register-
104 const __m256i extended = _mm256_cvtepu8_epi16(data);-
105-
106 uint n = _mm256_movemask_epi8(extended);-
107 if (!n) {-
108 // store-
109 _mm256_storeu_si256((__m256i*)dst, extended);-
110 continue;-
111 }-
112#else-
113 const int BitSpacing = 1;-
114-
115 // check if everything is ASCII-
116 // movemask extracts the high bit of every byte, so n is non-zero if something isn't ASCII-
117 uint n = _mm_movemask_epi8(data);-
118 if (!n) {
!nDescription
TRUEevaluated 4320068 times by 530 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAuthenticator
  • ...
FALSEevaluated 244233 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • ...
244233-4320068
119 // unpack-
120 _mm_storeu_si128((__m128i*)dst, _mm_unpacklo_epi8(data, _mm_setzero_si128()));-
121 _mm_storeu_si128(1+(__m128i*)dst, _mm_unpackhi_epi8(data, _mm_setzero_si128()));-
122 continue;
executed 4320068 times by 530 tests: continue;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAuthenticator
  • ...
4320068
123 }-
124#endif-
125-
126 // copy the front part that is still ASCII-
127 while (!(n & 1)) {
!(n & 1)Description
TRUEevaluated 1277262 times by 64 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • ...
FALSEevaluated 244233 times by 65 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • ...
244233-1277262
128 *dst++ = *src++;-
129 n >>= BitSpacing;-
130 }
executed 1277262 times by 64 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • ...
1277262
131-
132 // find the next probable ASCII character-
133 // we don't want to load 16 bytes again in this loop if we know there are non-ASCII-
134 // characters still coming-
135 n = _bit_scan_reverse(n);-
136 nextAscii = src + (n / BitSpacing) + 1;-
137 return false;
executed 244233 times by 65 tests: return false;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • ...
244233
138-
139 }-
140 return src == end;
executed 52293448 times by 569 tests: return src == end;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
52293448
141}-
142#else-
143static inline bool simdEncodeAscii(uchar *, const ushort *, const ushort *, const ushort *)-
144{-
145 return false;-
146}-
147-
148static inline bool simdDecodeAscii(ushort *, const uchar *, const uchar *, const uchar *)-
149{-
150 return false;-
151}-
152#endif-
153-
154QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len)-
155{-
156 // create a QByteArray with the worst case scenario size-
157 QByteArray result(len * 3, Qt::Uninitialized);-
158 uchar *dst = reinterpret_cast<uchar *>(const_cast<char *>(result.constData()));-
159 const ushort *src = reinterpret_cast<const ushort *>(uc);-
160 const ushort *const end = src + len;-
161-
162 while (src != end) {
src != endDescription
TRUEevaluated 104982 times by 245 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
FALSEevaluated 101886 times by 243 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
101886-104982
163 const ushort *nextAscii = end;-
164 if (simdEncodeAscii(dst, nextAscii, src, end))
simdEncodeAsci...cii, src, end)Description
TRUEevaluated 3437 times by 70 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • tst_QFontCache
  • ...
FALSEevaluated 101545 times by 243 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
3437-101545
165 break;
executed 3437 times by 70 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFiledialog
  • tst_QFont
  • tst_QFontCache
  • ...
3437
166-
167 do {-
168 ushort uc = *src++;-
169 int res = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc, dst, src, end);-
170 if (res < 0) {
res < 0Description
TRUEnever evaluated
FALSEevaluated 555898 times by 243 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
0-555898
171 // encoding error - append '?'-
172 *dst++ = '?';-
173 }
never executed: end of block
0
174 } while (src < nextAscii);
executed 555898 times by 243 tests: end of block
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
src < nextAsciiDescription
TRUEevaluated 454353 times by 238 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
FALSEevaluated 101545 times by 243 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
101545-555898
175 }
executed 101545 times by 243 tests: end of block
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
101545
176-
177 result.truncate(dst - reinterpret_cast<uchar *>(const_cast<char *>(result.constData())));-
178 return result;
executed 105323 times by 245 tests: return result;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
105323
179}-
180-
181QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state)-
182{-
183 uchar replacement = '?';-
184 int rlen = 3*len;-
185 int surrogate_high = -1;-
186 if (state) {
stateDescription
TRUEevaluated 39366 times by 21 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
FALSEevaluated 450707 times by 409 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
39366-450707
187 if (state->flags & QTextCodec::ConvertInvalidToNull)
state->flags &...tInvalidToNullDescription
TRUEevaluated 2468 times by 2 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QXmlSimpleReader
FALSEevaluated 36898 times by 19 tests
Evaluated by:
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
2468-36898
188 replacement = 0;
executed 2468 times by 2 tests: replacement = 0;
Executed by:
  • tst_QDBusXmlParser
  • tst_QXmlSimpleReader
2468
189 if (!(state->flags & QTextCodec::IgnoreHeader))
!(state->flags...:IgnoreHeader)Description
TRUEevaluated 2721 times by 4 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_Utf8
FALSEevaluated 36645 times by 19 tests
Evaluated by:
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
2721-36645
190 rlen += 3;
executed 2721 times by 4 tests: rlen += 3;
Executed by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_Utf8
2721
191 if (state->remainingChars)
state->remainingCharsDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
FALSEevaluated 39360 times by 21 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
6-39360
192 surrogate_high = state->state_data[0];
executed 6 times by 1 test: surrogate_high = state->state_data[0];
Executed by:
  • tst_Utf8
6
193 }
executed 39366 times by 21 tests: end of block
Executed by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
39366
194-
195-
196 QByteArray rstr(rlen, Qt::Uninitialized);-
197 uchar *cursor = reinterpret_cast<uchar *>(const_cast<char *>(rstr.constData()));-
198 const ushort *src = reinterpret_cast<const ushort *>(uc);-
199 const ushort *const end = src + len;-
200-
201 int invalid = 0;-
202 if (state && !(state->flags & QTextCodec::IgnoreHeader)) {
stateDescription
TRUEevaluated 39366 times by 21 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
FALSEevaluated 450707 times by 409 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
!(state->flags...:IgnoreHeader)Description
TRUEevaluated 2721 times by 4 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_Utf8
FALSEevaluated 36645 times by 19 tests
Evaluated by:
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
2721-450707
203 // append UTF-8 BOM-
204 *cursor++ = utf8bom[0];-
205 *cursor++ = utf8bom[1];-
206 *cursor++ = utf8bom[2];-
207 }
executed 2721 times by 4 tests: end of block
Executed by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_Utf8
2721
208-
209 const ushort *nextAscii = src;-
210 while (src != end) {
src != endDescription
TRUEevaluated 3879611 times by 408 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
FALSEevaluated 477672 times by 408 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
477672-3879611
211 int res;-
212 ushort uc;-
213 if (surrogate_high != -1) {
surrogate_high != -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
FALSEevaluated 3879605 times by 408 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
6-3879605
214 uc = surrogate_high;-
215 surrogate_high = -1;-
216 res = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc, cursor, src, end);-
217 } else {
executed 6 times by 1 test: end of block
Executed by:
  • tst_Utf8
6
218 if (src >= nextAscii && simdEncodeAscii(cursor, nextAscii, src, end))
src >= nextAsciiDescription
TRUEevaluated 3868460 times by 408 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
FALSEevaluated 11145 times by 10 tests
Evaluated by:
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlQuery
  • tst_QXmlStream
  • tst_Selftests
simdEncodeAsci...cii, src, end)Description
TRUEevaluated 12395 times by 176 tests
Evaluated by:
  • tst_Collections
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_NoApplication
  • ...
FALSEevaluated 3856065 times by 405 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
11145-3868460
219 break;
executed 12395 times by 176 tests: break;
Executed by:
  • tst_Collections
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_NoApplication
  • ...
12395
220-
221 uc = *src++;-
222 res = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc, cursor, src, end);-
223 }
executed 3867210 times by 405 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
3867210
224 if (Q_LIKELY(res >= 0))
__builtin_expe...s >= 0), true)Description
TRUEevaluated 3867210 times by 405 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
6-3867210
225 continue;
executed 3867210 times by 405 tests: continue;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
3867210
226-
227 if (res == QUtf8BaseTraits::Error) {
res == QUtf8BaseTraits::ErrorDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
0-6
228 // encoding error-
229 ++invalid;-
230 *cursor++ = replacement;-
231 } else if (res == QUtf8BaseTraits::EndOfString) {
never executed: end of block
res == QUtf8Ba...s::EndOfStringDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
FALSEnever evaluated
0-6
232 surrogate_high = uc;-
233 break;
executed 6 times by 1 test: break;
Executed by:
  • tst_Utf8
6
234 }-
235 }
never executed: end of block
0
236-
237 rstr.resize(cursor - (const uchar*)rstr.constData());-
238 if (state) {
stateDescription
TRUEevaluated 39366 times by 21 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
FALSEevaluated 450707 times by 409 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
39366-450707
239 state->invalidChars += invalid;-
240 state->flags |= QTextCodec::IgnoreHeader;-
241 state->remainingChars = 0;-
242 if (surrogate_high >= 0) {
surrogate_high >= 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
FALSEevaluated 39360 times by 21 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
6-39360
243 state->remainingChars = 1;-
244 state->state_data[0] = surrogate_high;-
245 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_Utf8
6
246 }
executed 39366 times by 21 tests: end of block
Executed by:
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QImage
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QKeyEvent
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QPlainTextEdit
  • tst_QSaveFile
  • tst_QSettings
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
39366
247 return rstr;
executed 490073 times by 409 tests: return rstr;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
490073
248}-
249-
250QString QUtf8::convertToUnicode(const char *chars, int len)-
251{-
252 // UTF-8 to UTF-16 always needs the exact same number of words or less:-
253 // UTF-8 UTF-16-
254 // 1 byte 1 word-
255 // 2 bytes 1 word-
256 // 3 bytes 1 word-
257 // 4 bytes 2 words (one surrogate pair)-
258 // That is, we'll use the full buffer if the input is US-ASCII (1-byte UTF-8),-
259 // half the buffer for U+0080-U+07FF text (e.g., Greek, Cyrillic, Arabic) or-
260 // non-BMP text, and one third of the buffer for U+0800-U+FFFF text (e.g, CJK).-
261 //-
262 // The table holds for invalid sequences too: we'll insert one replacement char-
263 // per invalid byte.-
264 QString result(len, Qt::Uninitialized);-
265 QChar *data = const_cast<QChar*>(result.constData()); // we know we're not shared-
266 const QChar *end = convertToUnicode(data, chars, len);-
267 result.truncate(end - data);-
268 return result;
executed 3930821 times by 532 tests: return result;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QAsn1Element
  • ...
3930821
269}-
270-
271/*!-
272 \since 5.7-
273 \overload-
274-
275 Converts the UTF-8 sequence of \a len octets beginning at \a chars to-
276 a sequence of QChar starting at \a buffer. The buffer is expected to be-
277 large enough to hold the result. An upper bound for the size of the-
278 buffer is \a len QChars.-
279-
280 If, during decoding, an error occurs, a QChar::ReplacementCharacter is-
281 written.-
282-
283 Returns a pointer to one past the last QChar written.-
284-
285 This function never throws.-
286*/-
287-
288QChar *QUtf8::convertToUnicode(QChar *buffer, const char *chars, int len) Q_DECL_NOTHROW-
289{-
290 ushort *dst = reinterpret_cast<ushort *>(buffer);-
291 const uchar *src = reinterpret_cast<const uchar *>(chars);-
292 const uchar *end = src + len;-
293-
294 // attempt to do a full decoding in SIMD-
295 const uchar *nextAscii = end;-
296 if (!simdDecodeAscii(dst, nextAscii, src, end)) {
!simdDecodeAsc...cii, src, end)Description
TRUEevaluated 4015432 times by 546 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
FALSEevaluated 598854 times by 300 tests
Evaluated by:
  • tst_Collections
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • ...
598854-4015432
297 // at least one non-ASCII entry-
298 // check if we failed to decode the UTF-8 BOM; if so, skip it-
299 if (Q_UNLIKELY(src == reinterpret_cast<const uchar *>(chars))
__builtin_expe...hars)), false)Description
TRUEevaluated 3479490 times by 518 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • ...
FALSEevaluated 535942 times by 497 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAuthenticator
  • ...
535942-3479490
300 && end - src >= 3
end - src >= 3Description
TRUEevaluated 1873886 times by 389 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QAuthenticator
  • ...
FALSEevaluated 1605604 times by 445 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • ...
1605604-1873886
301 && Q_UNLIKELY(src[0] == utf8bom[0] && src[1] == utf8bom[1] && src[2] == utf8bom[2])) {
__builtin_expe...om[2]), false)Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QUrlInternal
FALSEevaluated 1873881 times by 389 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QAuthenticator
  • ...
5-1873881
302 src += 3;-
303 }
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QString
  • tst_QUrlInternal
5
304-
305 while (src < end) {
src < endDescription
TRUEevaluated 4064914 times by 546 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
FALSEevaluated 4015424 times by 546 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
4015424-4064914
306 nextAscii = end;-
307 if (simdDecodeAscii(dst, nextAscii, src, end))
simdDecodeAsci...cii, src, end)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QComplexText
FALSEevaluated 4064906 times by 546 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
8-4064906
308 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_QComplexText
8
309-
310 do {-
311 uchar b = *src++;-
312 int res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(b, dst, src, end);-
313 if (res < 0) {
res < 0Description
TRUEevaluated 530 times by 5 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
FALSEevaluated 17941153 times by 546 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
530-17941153
314 // decoding error-
315 *dst++ = QChar::ReplacementCharacter;-
316 }
executed 530 times by 5 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
530
317 } while (src < nextAscii);
executed 17941683 times by 546 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
src < nextAsciiDescription
TRUEevaluated 13876777 times by 543 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
FALSEevaluated 4064906 times by 546 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
4064906-17941683
318 }
executed 4064906 times by 546 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
4064906
319 }
executed 4015432 times by 546 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
4015432
320-
321 return reinterpret_cast<QChar *>(dst);
executed 4614286 times by 546 tests: return reinterpret_cast<QChar *>(dst);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
4614286
322}-
323-
324QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state)-
325{-
326 bool headerdone = false;-
327 ushort replacement = QChar::ReplacementCharacter;-
328 int invalid = 0;-
329 int res;-
330 uchar ch = 0;-
331-
332 // See above for buffer requirements for stateless decoding. However, that-
333 // fails if the state is not empty. The following situations can add to the-
334 // requirements:-
335 // state contains chars starts with requirement-
336 // 1 of 2 bytes valid continuation 0-
337 // 2 of 3 bytes same 0-
338 // 3 bytes of 4 same +1 (need to insert surrogate pair)-
339 // 1 of 2 bytes invalid continuation +1 (need to insert replacement and restart)-
340 // 2 of 3 bytes same +1 (same)-
341 // 3 of 4 bytes same +1 (same)-
342 QString result(len + 1, Qt::Uninitialized);-
343-
344 ushort *dst = reinterpret_cast<ushort *>(const_cast<QChar *>(result.constData()));-
345 const uchar *src = reinterpret_cast<const uchar *>(chars);-
346 const uchar *end = src + len;-
347-
348 if (state) {
stateDescription
TRUEevaluated 41147320 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
FALSEevaluated 279743 times by 337 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
279743-41147320
349 if (state->flags & QTextCodec::IgnoreHeader)
state->flags &...::IgnoreHeaderDescription
TRUEevaluated 41134414 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 12906 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
12906-41134414
350 headerdone = true;
executed 41134414 times by 6 tests: headerdone = true;
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
41134414
351 if (state->flags & QTextCodec::ConvertInvalidToNull)
state->flags &...tInvalidToNullDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 41147316 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
4-41147316
352 replacement = QChar::Null;
executed 4 times by 1 test: replacement = QChar::Null;
Executed by:
  • tst_QTextCodec
4
353 if (state->remainingChars) {
state->remainingCharsDescription
TRUEevaluated 324 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 41146996 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
324-41146996
354 // handle incoming state first-
355 uchar remainingCharsData[4]; // longest UTF-8 sequence possible-
356 int remainingCharsCount = state->remainingChars;-
357 int newCharsToCopy = qMin<int>(sizeof(remainingCharsData) - remainingCharsCount, end - src);-
358-
359 memset(remainingCharsData, 0, sizeof(remainingCharsData));-
360 memcpy(remainingCharsData, &state->state_data[0], remainingCharsCount);-
361 memcpy(remainingCharsData + remainingCharsCount, src, newCharsToCopy);-
362-
363 const uchar *begin = &remainingCharsData[1];-
364 res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(remainingCharsData[0], dst, begin,-
365 static_cast<const uchar *>(remainingCharsData) + remainingCharsCount + newCharsToCopy);-
366 if (res == QUtf8BaseTraits::Error || (res == QUtf8BaseTraits::EndOfString && len == 0)) {
res == QUtf8BaseTraits::ErrorDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 310 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
res == QUtf8Ba...s::EndOfStringDescription
TRUEevaluated 86 times by 5 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 224 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
len == 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 80 times by 5 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
6-310
367 // special case for len == 0:-
368 // if we were supplied an empty string, terminate the previous, unfinished sequence with error-
369 ++invalid;-
370 *dst++ = replacement;-
371 } else if (res == QUtf8BaseTraits::EndOfString) {
executed 20 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
res == QUtf8Ba...s::EndOfStringDescription
TRUEevaluated 80 times by 5 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 224 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
20-224
372 // if we got EndOfString again, then there were too few bytes in src;-
373 // copy to our state and return-
374 state->remainingChars = remainingCharsCount + newCharsToCopy;-
375 memcpy(&state->state_data[0], remainingCharsData, state->remainingChars);-
376 return QString();
executed 80 times by 5 tests: return QString();
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
80
377 } else if (!headerdone && res >= 0) {
!headerdoneDescription
TRUEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
FALSEevaluated 197 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
res >= 0Description
TRUEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
FALSEnever evaluated
0-197
378 // eat the UTF-8 BOM-
379 headerdone = true;-
380 if (dst[-1] == 0xfeff)
dst[-1] == 0xfeffDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_Utf8
10-17
381 --dst;
executed 10 times by 2 tests: --dst;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
10
382 }
executed 27 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
27
383-
384 // adjust src now that we have maybe consumed a few chars-
385 if (res >= 0) {
res >= 0Description
TRUEevaluated 224 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_QTextCodec
20-224
386 Q_ASSERT(res > remainingCharsCount);-
387 src += res - remainingCharsCount;-
388 }
executed 224 times by 6 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
224
389 }
executed 244 times by 6 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
244
390 }
executed 41147240 times by 54 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
41147240
391-
392 // main body, stateless decoding-
393 res = 0;-
394 const uchar *nextAscii = src;-
395 const uchar *start = src;-
396 while (res >= 0 && src < end) {
res >= 0Description
TRUEevaluated 85706989 times by 344 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
FALSEevaluated 258 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
src < endDescription
TRUEevaluated 44293839 times by 344 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
FALSEevaluated 41413150 times by 342 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
258-85706989
397 if (src >= nextAscii && simdDecodeAscii(dst, nextAscii, src, end))
src >= nextAsciiDescription
TRUEevaluated 43858481 times by 344 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
FALSEevaluated 435358 times by 33 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • tst_QMimeDatabase
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyle
  • tst_QSystemTrayIcon
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • ...
simdDecodeAsci...cii, src, end)Description
TRUEevaluated 13575 times by 208 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusConnection_Delayed
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDBusXmlParser
  • tst_QDataWidgetMapper
  • ...
FALSEevaluated 43844906 times by 342 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
13575-43858481
398 break;
executed 13575 times by 208 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusConnection_Delayed
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDBusXmlParser
  • tst_QDataWidgetMapper
  • ...
13575
399-
400 ch = *src++;-
401 res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(ch, dst, src, end);-
402 if (!headerdone && res >= 0) {
!headerdoneDescription
TRUEevaluated 280915 times by 342 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
FALSEevaluated 43999349 times by 340 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
res >= 0Description
TRUEevaluated 280030 times by 342 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
FALSEevaluated 885 times by 5 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
885-43999349
403 headerdone = true;-
404 if (src == start + 3) { // 3 == sizeof(utf8-bom)
src == start + 3Description
TRUEevaluated 151 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 279879 times by 342 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
151-279879
405 // eat the UTF-8 BOM (it can only appear at the beginning of the string).-
406 if (dst[-1] == 0xfeff)
dst[-1] == 0xfeffDescription
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 136 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
15-136
407 --dst;
executed 15 times by 3 tests: --dst;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
15
408 }
executed 151 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
151
409 }
executed 280030 times by 342 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
280030
410 if (res == QUtf8BaseTraits::Error) {
res == QUtf8BaseTraits::ErrorDescription
TRUEevaluated 1176 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 44279088 times by 342 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
1176-44279088
411 res = 0;-
412 ++invalid;-
413 *dst++ = replacement;-
414 }
executed 1176 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
1176
415 }
executed 44280264 times by 342 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
44280264
416-
417 if (!state && res == QUtf8BaseTraits::EndOfString) {
!stateDescription
TRUEevaluated 279743 times by 337 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
FALSEevaluated 41147240 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
res == QUtf8Ba...s::EndOfStringDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 279734 times by 337 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
9-41147240
418 // unterminated UTF sequence-
419 *dst++ = QChar::ReplacementCharacter;-
420 while (src++ < end)
src++ < endDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
5-9
421 *dst++ = QChar::ReplacementCharacter;
executed 5 times by 1 test: *dst++ = QChar::ReplacementCharacter;
Executed by:
  • tst_QTextCodec
5
422 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
9
423-
424 result.truncate(dst - (const ushort *)result.unicode());-
425 if (state) {
stateDescription
TRUEevaluated 41147240 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
FALSEevaluated 279743 times by 337 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
279743-41147240
426 state->invalidChars += invalid;-
427 if (headerdone)
headerdoneDescription
TRUEevaluated 41146128 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
FALSEevaluated 1112 times by 13 tests
Evaluated by:
  • tst_QDBusXmlParser
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QSplitter
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QTimeZone
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
  • tst_qmakelib
1112-41146128
428 state->flags |= QTextCodec::IgnoreHeader;
executed 41146128 times by 54 tests: state->flags |= QTextCodec::IgnoreHeader;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
41146128
429 if (res == QUtf8BaseTraits::EndOfString) {
res == QUtf8Ba...s::EndOfStringDescription
TRUEevaluated 249 times by 6 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 41146991 times by 54 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
249-41146991
430 --src; // unread the byte in ch-
431 state->remainingChars = end - src;-
432 memcpy(&state->state_data[0], src, end - src);-
433 } else {
executed 249 times by 6 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
249
434 state->remainingChars = 0;-
435 }
executed 41146991 times by 54 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • ...
41146991
436 }-
437 return result;
executed 41426983 times by 344 tests: return result;
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
41426983
438}-
439-
440QByteArray QUtf16::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e)-
441{-
442 DataEndianness endian = e;-
443 int length = 2*len;-
444 if (!state || (!(state->flags & QTextCodec::IgnoreHeader))) {
!stateDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 16 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
(!(state->flag...IgnoreHeader))Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 13 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
3-52
445 length += 2;-
446 }
executed 55 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
55
447 if (e == DetectEndianness) {
e == DetectEndiannessDescription
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 53 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
15-53
448 endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
(QSysInfo::Byt...fo::BigEndian)Description
TRUEnever evaluated
FALSEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
0-15
449 }
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
15
450-
451 QByteArray d;-
452 d.resize(length);-
453 char *data = d.data();-
454 if (!state || !(state->flags & QTextCodec::IgnoreHeader)) {
!stateDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 16 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
!(state->flags...:IgnoreHeader)Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 13 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
3-52
455 QChar bom(QChar::ByteOrderMark);-
456 if (endian == BigEndianness) {
endian == BigEndiannessDescription
TRUEevaluated 23 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
23-32
457 data[0] = bom.row();-
458 data[1] = bom.cell();-
459 } else {
executed 23 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
23
460 data[0] = bom.cell();-
461 data[1] = bom.row();-
462 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
32
463 data += 2;-
464 }
executed 55 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
55
465 if (endian == BigEndianness) {
endian == BigEndiannessDescription
TRUEevaluated 23 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 45 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
23-45
466 for (int i = 0; i < len; ++i) {
i < lenDescription
TRUEevaluated 206 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 23 times by 1 test
Evaluated by:
  • tst_QTextCodec
23-206
467 *(data++) = uc[i].row();-
468 *(data++) = uc[i].cell();-
469 }
executed 206 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
206
470 } else {
executed 23 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
23
471 for (int i = 0; i < len; ++i) {
i < lenDescription
TRUEevaluated 337 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 45 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
45-337
472 *(data++) = uc[i].cell();-
473 *(data++) = uc[i].row();-
474 }
executed 337 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
337
475 }
executed 45 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
45
476-
477 if (state) {
stateDescription
TRUEevaluated 16 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_QTextCodec
16-52
478 state->remainingChars = 0;-
479 state->flags |= QTextCodec::IgnoreHeader;-
480 }
executed 16 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
16
481 return d;
executed 68 times by 4 tests: return d;
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
68
482}-
483-
484QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e)-
485{-
486 DataEndianness endian = e;-
487 bool half = false;-
488 uchar buf = 0;-
489 bool headerdone = false;-
490 if (state) {
stateDescription
TRUEevaluated 1988 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233881 times by 18 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_Utf8
1988-233881
491 headerdone = state->flags & QTextCodec::IgnoreHeader;-
492 if (endian == DetectEndianness)
endian == DetectEndiannessDescription
TRUEevaluated 1171 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 817 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
817-1171
493 endian = (DataEndianness)state->state_data[Endian];
executed 1171 times by 3 tests: endian = (DataEndianness)state->state_data[Endian];
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1171
494 if (state->remainingChars) {
state->remainingCharsDescription
TRUEevaluated 651 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 1337 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
651-1337
495 half = true;-
496 buf = state->state_data[Data];-
497 }
executed 651 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
651
498 }
executed 1988 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1988
499 if (headerdone && endian == DetectEndianness)
headerdoneDescription
TRUEevaluated 1659 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 234210 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
endian == DetectEndiannessDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 1658 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1-234210
500 endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
executed 1 time by 1 test: endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
Executed by:
  • tst_QTextCodec
(QSysInfo::Byt...fo::BigEndian)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
0-1
501-
502 QString result(len, Qt::Uninitialized); // worst case-
503 QChar *qch = (QChar *)result.data();-
504 while (len--) {
len--Description
TRUEevaluated 1186645 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 235869 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
235869-1186645
505 if (half) {
halfDescription
TRUEevaluated 593322 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 593323 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
593322-593323
506 QChar ch;-
507 if (endian == LittleEndianness) {
endian == LittleEndiannessDescription
TRUEevaluated 356752 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 236570 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
236570-356752
508 ch.setRow(*chars++);-
509 ch.setCell(buf);-
510 } else {
executed 356752 times by 21 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
356752
511 ch.setRow(buf);-
512 ch.setCell(*chars++);-
513 }
executed 236570 times by 21 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
236570
514 if (!headerdone) {
!headerdoneDescription
TRUEevaluated 234162 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 359160 times by 21 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
234162-359160
515 headerdone = true;-
516 if (endian == DetectEndianness) {
endian == DetectEndiannessDescription
TRUEevaluated 233914 times by 20 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 248 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
248-233914
517 if (ch == QChar::ByteOrderSwapped) {
ch == QChar::ByteOrderSwappedDescription
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233836 times by 20 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
78-233836
518 endian = LittleEndianness;-
519 } else if (ch == QChar::ByteOrderMark) {
executed 78 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
ch == QChar::ByteOrderMarkDescription
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233833 times by 19 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Utf8
3-233833
520 endian = BigEndianness;-
521 } else {
executed 3 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
3
522 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
QSysInfo::Byte...nfo::BigEndianDescription
TRUEnever evaluated
FALSEevaluated 233833 times by 19 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Utf8
0-233833
523 endian = BigEndianness;-
524 } else {
never executed: end of block
0
525 endian = LittleEndianness;-
526 ch = QChar((ch.unicode() >> 8) | ((ch.unicode() & 0xff) << 8));-
527 }
executed 233833 times by 19 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Utf8
233833
528 *qch++ = ch;-
529 }
executed 233833 times by 19 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_QXmlStream
  • tst_Utf8
233833
530 } else if (ch != QChar::ByteOrderMark) {
ch != QChar::ByteOrderMarkDescription
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 244 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
4-244
531 *qch++ = ch;-
532 }
executed 4 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
4
533 } else {
executed 234162 times by 21 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
234162
534 *qch++ = ch;-
535 }
executed 359160 times by 21 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
359160
536 half = false;-
537 } else {
executed 593322 times by 21 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
593322
538 buf = *chars++;-
539 half = true;-
540 }
executed 593323 times by 21 tests: end of block
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
593323
541 }-
542 result.truncate(qch - result.unicode());-
543-
544 if (state) {
stateDescription
TRUEevaluated 1988 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233881 times by 18 tests
Evaluated by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QUrlInternal
  • tst_Utf8
1988-233881
545 if (headerdone)
headerdoneDescription
TRUEevaluated 1940 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QTextStream
48-1940
546 state->flags |= QTextCodec::IgnoreHeader;
executed 1940 times by 4 tests: state->flags |= QTextCodec::IgnoreHeader;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1940
547 state->state_data[Endian] = endian;-
548 if (half) {
halfDescription
TRUEevaluated 652 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 1336 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
652-1336
549 state->remainingChars = 1;-
550 state->state_data[Data] = buf;-
551 } else {
executed 652 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
652
552 state->remainingChars = 0;-
553 state->state_data[Data] = 0;-
554 }
executed 1336 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1336
555 }-
556 return result;
executed 235869 times by 21 tests: return result;
Executed by:
  • tst_QDebug
  • tst_QItemModel
  • tst_QNetworkCookieJar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlResult
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringRef
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
235869
557}-
558-
559QByteArray QUtf32::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e)-
560{-
561 DataEndianness endian = e;-
562 int length = 4*len;-
563 if (!state || (!(state->flags & QTextCodec::IgnoreHeader))) {
!stateDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
(!(state->flag...IgnoreHeader))Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
2-22
564 length += 4;-
565 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
24
566 if (e == DetectEndianness) {
e == DetectEndiannessDescription
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextCodec
11-15
567 endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
(QSysInfo::Byt...fo::BigEndian)Description
TRUEnever evaluated
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QTextCodec
0-11
568 }
executed 11 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
11
569-
570 QByteArray d(length, Qt::Uninitialized);-
571 char *data = d.data();-
572 if (!state || !(state->flags & QTextCodec::IgnoreHeader)) {
!stateDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
!(state->flags...:IgnoreHeader)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
2-22
573 if (endian == BigEndianness) {
endian == BigEndiannessDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 17 times by 1 test
Evaluated by:
  • tst_QTextCodec
7-17
574 data[0] = 0;-
575 data[1] = 0;-
576 data[2] = (char)0xfe;-
577 data[3] = (char)0xff;-
578 } else {
executed 7 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
7
579 data[0] = (char)0xff;-
580 data[1] = (char)0xfe;-
581 data[2] = 0;-
582 data[3] = 0;-
583 }
executed 17 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
17
584 data += 4;-
585 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
24
586-
587 QStringIterator i(uc, uc + len);-
588 if (endian == BigEndianness) {
endian == BigEndiannessDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_QTextCodec
7-19
589 while (i.hasNext()) {
i.hasNext()Description
TRUEevaluated 54 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QTextCodec
7-54
590 uint cp = i.next();-
591-
592 *(data++) = cp >> 24;-
593 *(data++) = (cp >> 16) & 0xff;-
594 *(data++) = (cp >> 8) & 0xff;-
595 *(data++) = cp & 0xff;-
596 }
executed 54 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
54
597 } else {
executed 7 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
7
598 while (i.hasNext()) {
i.hasNext()Description
TRUEevaluated 122 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_QTextCodec
19-122
599 uint cp = i.next();-
600-
601 *(data++) = cp & 0xff;-
602 *(data++) = (cp >> 8) & 0xff;-
603 *(data++) = (cp >> 16) & 0xff;-
604 *(data++) = cp >> 24;-
605 }
executed 122 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
122
606 }
executed 19 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
19
607-
608 if (state) {
stateDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_QTextCodec
4-22
609 state->remainingChars = 0;-
610 state->flags |= QTextCodec::IgnoreHeader;-
611 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
4
612 return d;
executed 26 times by 1 test: return d;
Executed by:
  • tst_QTextCodec
26
613}-
614-
615QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e)-
616{-
617 DataEndianness endian = e;-
618 uchar tuple[4];-
619 int num = 0;-
620 bool headerdone = false;-
621 if (state) {
stateDescription
TRUEevaluated 364 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 410534 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
364-410534
622 headerdone = state->flags & QTextCodec::IgnoreHeader;-
623 if (endian == DetectEndianness) {
endian == DetectEndiannessDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 360 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
4-360
624 endian = (DataEndianness)state->state_data[Endian];-
625 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
4
626 num = state->remainingChars;-
627 memcpy(tuple, &state->state_data[Data], 4);-
628 }
executed 364 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
364
629 if (headerdone && endian == DetectEndianness)
headerdoneDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 410895 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
endian == DetectEndiannessDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextCodec
1-410895
630 endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
executed 1 time by 1 test: endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness;
Executed by:
  • tst_QTextCodec
(QSysInfo::Byt...fo::BigEndian)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
0-1
631-
632 QString result;-
633 result.resize((num + len) >> 2 << 1); // worst case-
634 QChar *qch = (QChar *)result.data();-
635-
636 const char *end = chars + len;-
637 while (chars < end) {
chars < endDescription
TRUEevaluated 1647700 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
FALSEevaluated 410898 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
410898-1647700
638 tuple[num++] = *chars++;-
639 if (num == 4) {
num == 4Description
TRUEevaluated 411925 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
FALSEevaluated 1235775 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
411925-1235775
640 if (!headerdone) {
!headerdoneDescription
TRUEevaluated 411913 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QTextCodec
12-411913
641 if (endian == DetectEndianness) {
endian == DetectEndiannessDescription
TRUEevaluated 410515 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
FALSEevaluated 1398 times by 5 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
  • tst_qmakelib
1398-410515
642 if (tuple[0] == 0xff && tuple[1] == 0xfe && tuple[2] == 0 && tuple[3] == 0 && endian != BigEndianness) {
tuple[0] == 0xffDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 410506 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
tuple[1] == 0xfeDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEnever evaluated
tuple[2] == 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEnever evaluated
tuple[3] == 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEnever evaluated
endian != BigEndiannessDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEnever evaluated
0-410506
643 endian = LittleEndianness;-
644 num = 0;-
645 continue;
executed 9 times by 1 test: continue;
Executed by:
  • tst_QTextCodec
9
646 } else if (tuple[0] == 0 && tuple[1] == 0 && tuple[2] == 0xfe && tuple[3] == 0xff && endian != LittleEndianness) {
tuple[0] == 0Description
TRUEevaluated 22 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QXmlStream
FALSEevaluated 410484 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
tuple[1] == 0Description
TRUEevaluated 14 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QXmlStream
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QStringIterator
tuple[2] == 0xfeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QString
  • tst_QStringIterator
  • tst_QXmlStream
tuple[3] == 0xffDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEnever evaluated
endian != LittleEndiannessDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEnever evaluated
0-410484
647 endian = BigEndianness;-
648 num = 0;-
649 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QTextCodec
1
650 } else if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
QSysInfo::Byte...nfo::BigEndianDescription
TRUEnever evaluated
FALSEevaluated 410505 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
0-410505
651 endian = BigEndianness;-
652 } else {
never executed: end of block
0
653 endian = LittleEndianness;-
654 }
executed 410505 times by 9 tests: end of block
Executed by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
410505
655 } else if (((endian == BigEndianness) ? qFromBigEndian<quint32>(tuple) : qFromLittleEndian<quint32>(tuple)) == QChar::ByteOrderMark) {
((endian == Bi...:ByteOrderMarkDescription
TRUEevaluated 47 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 1351 times by 5 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
  • tst_qmakelib
(endian == BigEndianness)Description
TRUEevaluated 220 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 1178 times by 5 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
  • tst_qmakelib
47-1351
656 num = 0;-
657 continue;
executed 47 times by 2 tests: continue;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
47
658 }-
659 }
executed 411856 times by 10 tests: end of block
Executed by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
411856
660 uint code = (endian == BigEndianness) ? qFromBigEndian<quint32>(tuple) : qFromLittleEndian<quint32>(tuple);
(endian == BigEndianness)Description
TRUEevaluated 200 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 411668 times by 10 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
200-411668
661 if (QChar::requiresSurrogates(code)) {
QChar::require...rrogates(code)Description
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_QString
  • tst_QStringIterator
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 411810 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_Utf8
  • tst_qmakelib
58-411810
662 *qch++ = QChar::highSurrogate(code);-
663 *qch++ = QChar::lowSurrogate(code);-
664 } else {
executed 58 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QStringIterator
  • tst_QXmlStream
  • tst_Utf8
58
665 *qch++ = code;-
666 }
executed 411810 times by 9 tests: end of block
Executed by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_Utf8
  • tst_qmakelib
411810
667 num = 0;-
668 }
executed 411868 times by 10 tests: end of block
Executed by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
411868
669 }
executed 1647643 times by 10 tests: end of block
Executed by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
1647643
670 result.truncate(qch - result.unicode());-
671-
672 if (state) {
stateDescription
TRUEevaluated 364 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 410534 times by 9 tests
Evaluated by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
364-410534
673 if (headerdone)
headerdoneDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 361 times by 2 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
3-361
674 state->flags |= QTextCodec::IgnoreHeader;
executed 3 times by 1 test: state->flags |= QTextCodec::IgnoreHeader;
Executed by:
  • tst_QTextCodec
3
675 state->state_data[Endian] = endian;-
676 state->remainingChars = num;-
677 memcpy(&state->state_data[Data], tuple, 4);-
678 }
executed 364 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
364
679 return result;
executed 410898 times by 10 tests: return result;
Executed by:
  • tst_QLabel
  • tst_QString
  • tst_QStringIterator
  • tst_QTextCodec
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
  • tst_qmakelib
410898
680}-
681-
682-
683#ifndef QT_NO_TEXTCODEC-
684-
685QUtf8Codec::~QUtf8Codec()-
686{-
687}-
688-
689QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const-
690{-
691 return QUtf8::convertFromUnicode(uc, len, state);
executed 490073 times by 409 tests: return QUtf8::convertFromUnicode(uc, len, state);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
490073
692}-
693-
694void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, ConverterState *state) const-
695{-
696 *target += QUtf8::convertToUnicode(chars, len, state);-
697}
executed 62786 times by 37 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
62786
698-
699QString QUtf8Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const-
700{-
701 return QUtf8::convertToUnicode(chars, len, state);
executed 41364277 times by 337 tests: return QUtf8::convertToUnicode(chars, len, state);
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • ...
41364277
702}-
703-
704QByteArray QUtf8Codec::name() const-
705{-
706 return "UTF-8";
executed 357 times by 38 tests: return "UTF-8";
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
  • ...
357
707}-
708-
709int QUtf8Codec::mibEnum() const-
710{-
711 return 106;
executed 63049 times by 43 tests: return 106;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusContext
  • tst_QDBusInterface
  • tst_QDBusMetaObject
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QDBusXmlParser
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • ...
63049
712}-
713-
714QUtf16Codec::~QUtf16Codec()-
715{-
716}-
717-
718QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const-
719{-
720 return QUtf16::convertFromUnicode(uc, len, state, e);
executed 68 times by 4 tests: return QUtf16::convertFromUnicode(uc, len, state, e);
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
68
721}-
722-
723QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const-
724{-
725 return QUtf16::convertToUnicode(chars, len, state, e);
executed 2038 times by 4 tests: return QUtf16::convertToUnicode(chars, len, state, e);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
2038
726}-
727-
728int QUtf16Codec::mibEnum() const-
729{-
730 return 1015;
executed 445 times by 3 tests: return 1015;
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
445
731}-
732-
733QByteArray QUtf16Codec::name() const-
734{-
735 return "UTF-16";
executed 145 times by 5 tests: return "UTF-16";
Executed by:
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
145
736}-
737-
738QList<QByteArray> QUtf16Codec::aliases() const-
739{-
740 return QList<QByteArray>();
executed 143 times by 4 tests: return QList<QByteArray>();
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
143
741}-
742-
743int QUtf16BECodec::mibEnum() const-
744{-
745 return 1013;
executed 22 times by 3 tests: return 1013;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
22
746}-
747-
748QByteArray QUtf16BECodec::name() const-
749{-
750 return "UTF-16BE";
executed 159 times by 3 tests: return "UTF-16BE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
159
751}-
752-
753QList<QByteArray> QUtf16BECodec::aliases() const-
754{-
755 QList<QByteArray> list;-
756 return list;
executed 158 times by 3 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
158
757}-
758-
759int QUtf16LECodec::mibEnum() const-
760{-
761 return 1014;
executed 22 times by 2 tests: return 1014;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
22
762}-
763-
764QByteArray QUtf16LECodec::name() const-
765{-
766 return "UTF-16LE";
executed 153 times by 4 tests: return "UTF-16LE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
153
767}-
768-
769QList<QByteArray> QUtf16LECodec::aliases() const-
770{-
771 QList<QByteArray> list;-
772 return list;
executed 150 times by 4 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
150
773}-
774-
775QUtf32Codec::~QUtf32Codec()-
776{-
777}-
778-
779QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const-
780{-
781 return QUtf32::convertFromUnicode(uc, len, state, e);
executed 26 times by 1 test: return QUtf32::convertFromUnicode(uc, len, state, e);
Executed by:
  • tst_QTextCodec
26
782}-
783-
784QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const-
785{-
786 return QUtf32::convertToUnicode(chars, len, state, e);
executed 383 times by 2 tests: return QUtf32::convertToUnicode(chars, len, state, e);
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
383
787}-
788-
789int QUtf32Codec::mibEnum() const-
790{-
791 return 1017;
executed 17 times by 1 test: return 1017;
Executed by:
  • tst_QTextCodec
17
792}-
793-
794QByteArray QUtf32Codec::name() const-
795{-
796 return "UTF-32";
executed 131 times by 1 test: return "UTF-32";
Executed by:
  • tst_QTextCodec
131
797}-
798-
799QList<QByteArray> QUtf32Codec::aliases() const-
800{-
801 QList<QByteArray> list;-
802 return list;
executed 130 times by 1 test: return list;
Executed by:
  • tst_QTextCodec
130
803}-
804-
805int QUtf32BECodec::mibEnum() const-
806{-
807 return 1018;
executed 21 times by 2 tests: return 1018;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
21
808}-
809-
810QByteArray QUtf32BECodec::name() const-
811{-
812 return "UTF-32BE";
executed 135 times by 2 tests: return "UTF-32BE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
135
813}-
814-
815QList<QByteArray> QUtf32BECodec::aliases() const-
816{-
817 QList<QByteArray> list;-
818 return list;
executed 134 times by 2 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
134
819}-
820-
821int QUtf32LECodec::mibEnum() const-
822{-
823 return 1019;
executed 22 times by 2 tests: return 1019;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
22
824}-
825-
826QByteArray QUtf32LECodec::name() const-
827{-
828 return "UTF-32LE";
executed 132 times by 2 tests: return "UTF-32LE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
132
829}-
830-
831QList<QByteArray> QUtf32LECodec::aliases() const-
832{-
833 QList<QByteArray> list;-
834 return list;
executed 131 times by 2 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
131
835}-
836-
837#endif //QT_NO_TEXTCODEC-
838-
839QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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