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) 2015 The Qt Company Ltd.-
4** Copyright (C) 2013 Intel Corporation-
5** Contact: http://www.qt.io/licensing/-
6**-
7** This file is part of the QtCore module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL21$-
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 http://www.qt.io/terms-conditions. For further-
16** information use the contact form at http://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 2.1 or version 3 as published by the Free-
21** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
22** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
23** following information to ensure the GNU Lesser General Public License-
24** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
25** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
26**-
27** As a special exception, The Qt Company gives you certain additional-
28** rights. These rights are described in The Qt Company LGPL Exception-
29** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
30**-
31** $QT_END_LICENSE$-
32**-
33****************************************************************************/-
34-
35#include "qutfcodec_p.h"-
36#include "qlist.h"-
37#include "qendian.h"-
38#include "qchar.h"-
39-
40#include "private/qsimd_p.h"-
41#include "private/qstringiterator_p.h"-
42-
43QT_BEGIN_NAMESPACE-
44-
45enum { Endian = 0, Data = 1 };-
46-
47static const uchar utf8bom[] = { 0xef, 0xbb, 0xbf };-
48-
49#if defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)-
50static inline bool simdEncodeAscii(uchar *&dst, const ushort *&nextAscii, const ushort *&src, const ushort *end)-
51{-
52 // do sixteen characters at a time-
53 for ( ; end - src >= 16; src += 16, dst += 16) {
end - src >= 16Description
TRUEevaluated 2522900 times by 392 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 4467936 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
  • ...
2522900-4467936
54 __m128i data1 = _mm_loadu_si128((const __m128i*)src);-
55 __m128i data2 = _mm_loadu_si128(1+(const __m128i*)src);-
56-
57-
58 // check if everything is ASCII-
59 // the highest ASCII value is U+007F-
60 // Do the packing directly:-
61 // The PACKUSWB instruction has packs a signed 16-bit integer to an unsigned 8-bit-
62 // with saturation. That is, anything from 0x0100 to 0x7fff is saturated to 0xff,-
63 // while all negatives (0x8000 to 0xffff) get saturated to 0x00. To detect non-ASCII,-
64 // we simply do a signed greater-than comparison to 0x00. That means we detect NULs as-
65 // "non-ASCII", but it's an acceptable compromise.-
66 __m128i packed = _mm_packus_epi16(data1, data2);-
67 __m128i nonAscii = _mm_cmpgt_epi8(packed, _mm_setzero_si128());-
68-
69 // store, even if there are non-ASCII characters here-
70 _mm_storeu_si128((__m128i*)dst, packed);-
71-
72 // n will contain 1 bit set per character in [data1, data2] that is non-ASCII (or NUL)-
73 ushort n = ~_mm_movemask_epi8(nonAscii);-
74 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 2518914 times by 390 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-2518914
75 // find the next probable ASCII character-
76 // we don't want to load 32 bytes again in this loop if we know there are non-ASCII-
77 // characters still coming-
78 nextAscii = src + _bit_scan_reverse(n) + 1;-
79-
80 n = _bit_scan_forward(n);-
81 dst += n;-
82 src += n;-
83 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
84 }-
85 }
executed 2518914 times by 390 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
  • ...
2518914
86 return src == end;
executed 4467936 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
  • ...
4467936
87}-
88-
89static inline bool simdDecodeAscii(ushort *&dst, const uchar *&nextAscii, const uchar *&src, const uchar *end)-
90{-
91 // do sixteen characters at a time-
92 for ( ; end - src >= 16; src += 16, dst += 16) {
end - src >= 16Description
TRUEevaluated 4114649 times by 536 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 58704522 times by 573 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
  • ...
4114649-58704522
93 __m128i data = _mm_loadu_si128((const __m128i*)src);-
94-
95#ifdef __AVX2__-
96 const int BitSpacing = 2;-
97 // load and zero extend to an YMM register-
98 const __m256i extended = _mm256_cvtepu8_epi16(data);-
99-
100 uint n = _mm256_movemask_epi8(extended);-
101 if (!n) {-
102 // store-
103 _mm256_storeu_si256((__m256i*)dst, extended);-
104 continue;-
105 }-
106#else-
107 const int BitSpacing = 1;-
108-
109 // check if everything is ASCII-
110 // movemask extracts the high bit of every byte, so n is non-zero if something isn't ASCII-
111 uint n = _mm_movemask_epi8(data);-
112 if (!n) {
!nDescription
TRUEevaluated 3938446 times by 532 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 176203 times by 45 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QComplexText
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeDatabase
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder1
  • ...
176203-3938446
113 // unpack-
114 _mm_storeu_si128((__m128i*)dst, _mm_unpacklo_epi8(data, _mm_setzero_si128()));-
115 _mm_storeu_si128(1+(__m128i*)dst, _mm_unpackhi_epi8(data, _mm_setzero_si128()));-
116 continue;
executed 3938446 times by 532 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
  • ...
3938446
117 }-
118#endif-
119-
120 // copy the front part that is still ASCII-
121 while (!(n & 1)) {
!(n & 1)Description
TRUEevaluated 849751 times by 44 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QComplexText
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeDatabase
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder1
  • ...
FALSEevaluated 176203 times by 45 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QComplexText
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeDatabase
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder1
  • ...
176203-849751
122 *dst++ = *src++;-
123 n >>= BitSpacing;-
124 }
executed 849751 times by 44 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QComplexText
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeDatabase
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder1
  • ...
849751
125-
126 // find the next probable ASCII character-
127 // we don't want to load 16 bytes again in this loop if we know there are non-ASCII-
128 // characters still coming-
129 n = _bit_scan_reverse(n);-
130 nextAscii = src + (n / BitSpacing) + 1;-
131 return false;
executed 176203 times by 45 tests: return false;
Executed by:
  • tst_NetworkSelfTest
  • tst_QComplexText
  • tst_QDateTime
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeDatabase
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
  • tst_QStringBuilder1
  • ...
176203
132-
133 }-
134 return src == end;
executed 58704522 times by 573 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
  • ...
58704522
135}-
136#else-
137static inline bool simdEncodeAscii(uchar *, const ushort *, const ushort *, const ushort *)-
138{-
139 return false;-
140}-
141-
142static inline bool simdDecodeAscii(ushort *, const uchar *, const uchar *, const uchar *)-
143{-
144 return false;-
145}-
146#endif-
147-
148QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len)-
149{-
150 // create a QByteArray with the worst case scenario size-
151 QByteArray result(len * 3, Qt::Uninitialized);-
152 uchar *dst = reinterpret_cast<uchar *>(const_cast<char *>(result.constData()));-
153 const ushort *src = reinterpret_cast<const ushort *>(uc);-
154 const ushort *const end = src + len;-
155-
156 while (src != end) {
src != endDescription
TRUEevaluated 109617 times by 247 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 106493 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
  • ...
106493-109617
157 const ushort *nextAscii = end;-
158 if (simdEncodeAscii(dst, nextAscii, src, end))
simdEncodeAsci...cii, src, end)Description
TRUEevaluated 3465 times by 67 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 106152 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
  • ...
3465-106152
159 break;
executed 3465 times by 67 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
  • ...
3465
160-
161 do {-
162 ushort uc = *src++;-
163 int res = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc, dst, src, end);-
164 if (res < 0) {
res < 0Description
TRUEnever evaluated
FALSEevaluated 605299 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
  • ...
0-605299
165 // encoding error - append '?'-
166 *dst++ = '?';-
167 }
never executed: end of block
0
168 } while (src < nextAscii);
executed 605299 times by 245 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 499147 times by 240 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 106152 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
  • ...
106152-605299
169 }
executed 106152 times by 245 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
  • ...
106152
170-
171 result.truncate(dst - reinterpret_cast<uchar *>(const_cast<char *>(result.constData())));-
172 return result;
executed 109958 times by 247 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
  • ...
109958
173}-
174-
175QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state)-
176{-
177 uchar replacement = '?';-
178 int rlen = 3*len;-
179 int surrogate_high = -1;-
180 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 531831 times by 407 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-531831
181 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
182 replacement = 0;
executed 2468 times by 2 tests: replacement = 0;
Executed by:
  • tst_QDBusXmlParser
  • tst_QXmlSimpleReader
2468
183 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
184 rlen += 3;
executed 2721 times by 4 tests: rlen += 3;
Executed by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_Utf8
2721
185 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
186 surrogate_high = state->state_data[0];
executed 6 times by 1 test: surrogate_high = state->state_data[0];
Executed by:
  • tst_Utf8
6
187 }
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
188-
189-
190 QByteArray rstr(rlen, Qt::Uninitialized);-
191 uchar *cursor = reinterpret_cast<uchar *>(const_cast<char *>(rstr.constData()));-
192 const ushort *src = reinterpret_cast<const ushort *>(uc);-
193 const ushort *const end = src + len;-
194-
195 int invalid = 0;-
196 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 531831 times by 407 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-531831
197 // append UTF-8 BOM-
198 *cursor++ = utf8bom[0];-
199 *cursor++ = utf8bom[1];-
200 *cursor++ = utf8bom[2];-
201 }
executed 2721 times by 4 tests: end of block
Executed by:
  • tst_QDBusXmlParser
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_Utf8
2721
202-
203 const ushort *nextAscii = src;-
204 while (src != end) {
src != endDescription
TRUEevaluated 4373456 times by 406 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 552095 times by 406 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
  • ...
552095-4373456
205 int res;-
206 ushort uc;-
207 if (surrogate_high != -1) {
surrogate_high != -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
FALSEevaluated 4373450 times by 406 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-4373450
208 uc = surrogate_high;-
209 surrogate_high = -1;-
210 res = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc, cursor, src, end);-
211 } else {
executed 6 times by 1 test: end of block
Executed by:
  • tst_Utf8
6
212 if (src >= nextAscii && simdEncodeAscii(cursor, nextAscii, src, end))
src >= nextAsciiDescription
TRUEevaluated 4362305 times by 406 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 19096 times by 180 tests
Evaluated by:
  • tst_Collections
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
FALSEevaluated 4343209 times by 403 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-4362305
213 break;
executed 19096 times by 180 tests: break;
Executed by:
  • tst_Collections
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • 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_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QCryptographicHash
  • tst_QCssParser
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • ...
19096
214-
215 uc = *src++;-
216 res = QUtf8Functions::toUtf8<QUtf8BaseTraits>(uc, cursor, src, end);-
217 }
executed 4354354 times by 403 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
  • ...
4354354
218 if (Q_LIKELY(res >= 0))
__builtin_expe...s >= 0), true)Description
TRUEevaluated 4354354 times by 403 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-4354354
219 continue;
executed 4354354 times by 403 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
  • ...
4354354
220-
221 if (res == QUtf8BaseTraits::Error) {
res == QUtf8BaseTraits::ErrorDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_Utf8
0-6
222 // encoding error-
223 ++invalid;-
224 *cursor++ = replacement;-
225 } 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
226 surrogate_high = uc;-
227 break;
executed 6 times by 1 test: break;
Executed by:
  • tst_Utf8
6
228 }-
229 }
never executed: end of block
0
230-
231 rstr.resize(cursor - (const uchar*)rstr.constData());-
232 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 531831 times by 407 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-531831
233 state->invalidChars += invalid;-
234 state->flags |= QTextCodec::IgnoreHeader;-
235 state->remainingChars = 0;-
236 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
237 state->remainingChars = 1;-
238 state->state_data[0] = surrogate_high;-
239 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_Utf8
6
240 }
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
241 return rstr;
executed 571197 times by 407 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
  • ...
571197
242}-
243-
244QString QUtf8::convertToUnicode(const char *chars, int len)-
245{-
246 // UTF-8 to UTF-16 always needs the exact same number of words or less:-
247 // UTF-8 UTF-16-
248 // 1 byte 1 word-
249 // 2 bytes 1 word-
250 // 3 bytes 1 word-
251 // 4 bytes 2 words (one surrogate pair)-
252 // That is, we'll use the full buffer if the input is US-ASCII (1-byte UTF-8),-
253 // half the buffer for U+0080-U+07FF text (e.g., Greek, Cyrillic, Arabic) or-
254 // non-BMP text, and one third of the buffer for U+0800-U+FFFF text (e.g, CJK).-
255 //-
256 // The table holds for invalid sequences too: we'll insert one replacement char-
257 // per invalid byte.-
258 QString result(len, Qt::Uninitialized);-
259-
260 ushort *dst = reinterpret_cast<ushort *>(const_cast<QChar *>(result.constData()));-
261 const uchar *src = reinterpret_cast<const uchar *>(chars);-
262 const uchar *end = src + len;-
263-
264 // attempt to do a full decoding in SIMD-
265 const uchar *nextAscii = end;-
266 if (!simdDecodeAscii(dst, nextAscii, src, end)) {
!simdDecodeAsc...cii, src, end)Description
TRUEevaluated 7292129 times by 550 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 516071 times by 294 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
  • ...
516071-7292129
267 // at least one non-ASCII entry-
268 // check if we failed to decode the UTF-8 BOM; if so, skip it-
269 if (Q_UNLIKELY(src == reinterpret_cast<const uchar *>(chars))
__builtin_expe...hars)), false)Description
TRUEevaluated 6758996 times by 520 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 533133 times by 500 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
  • ...
533133-6758996
270 && end - src >= 3
end - src >= 3Description
TRUEevaluated 5056280 times by 390 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 1702716 times by 438 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
  • ...
1702716-5056280
271 && 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 5056275 times by 390 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-5056275
272 src += 3;-
273 }
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QString
  • tst_QUrlInternal
5
274-
275 while (src < end) {
src < endDescription
TRUEevaluated 7341615 times by 550 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 7292121 times by 550 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
  • ...
7292121-7341615
276 nextAscii = end;-
277 if (simdDecodeAscii(dst, nextAscii, src, end))
simdDecodeAsci...cii, src, end)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QComplexText
FALSEevaluated 7341607 times by 550 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-7341607
278 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_QComplexText
8
279-
280 do {-
281 uchar b = *src++;-
282 int res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(b, dst, src, end);-
283 if (res < 0) {
res < 0Description
TRUEevaluated 530 times by 5 tests
Evaluated by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
FALSEevaluated 43709384 times by 550 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-43709384
284 // decoding error-
285 *dst++ = QChar::ReplacementCharacter;-
286 }
executed 530 times by 5 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrlInternal
  • tst_QXmlSimpleReader
530
287 } while (src < nextAscii);
executed 43707714 times by 550 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 36368307 times by 547 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 7341607 times by 550 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
  • ...
7341607-43707714
288 }
executed 7341607 times by 550 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
  • ...
7341607
289 }
executed 7292129 times by 550 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
  • ...
7292129
290-
291 result.truncate(dst - reinterpret_cast<const ushort *>(result.constData()));-
292 return result;
executed 7808200 times by 550 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_QAnimationGroup
  • tst_QApplication
  • ...
7808200
293}-
294-
295QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state)-
296{-
297 bool headerdone = false;-
298 ushort replacement = QChar::ReplacementCharacter;-
299 int invalid = 0;-
300 int res;-
301 uchar ch = 0;-
302-
303 // See above for buffer requirements for stateless decoding. However, that-
304 // fails if the state is not empty. The following situations can add to the-
305 // requirements:-
306 // state contains chars starts with requirement-
307 // 1 of 2 bytes valid continuation 0-
308 // 2 of 3 bytes same 0-
309 // 3 bytes of 4 same +1 (need to insert surrogate pair)-
310 // 1 of 2 bytes invalid continuation +1 (need to insert replacement and restart)-
311 // 2 of 3 bytes same +1 (same)-
312 // 3 of 4 bytes same +1 (same)-
313 QString result(len + 1, Qt::Uninitialized);-
314-
315 ushort *dst = reinterpret_cast<ushort *>(const_cast<QChar *>(result.constData()));-
316 const uchar *src = reinterpret_cast<const uchar *>(chars);-
317 const uchar *end = src + len;-
318-
319 if (state) {
stateDescription
TRUEevaluated 41144891 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
FALSEevaluated 272414 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
  • ...
272414-41144891
320 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 10477 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
10477-41134414
321 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
322 if (state->flags & QTextCodec::ConvertInvalidToNull)
state->flags &...tInvalidToNullDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 41144887 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
4-41144887
323 replacement = QChar::Null;
executed 4 times by 1 test: replacement = QChar::Null;
Executed by:
  • tst_QTextCodec
4
324 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 41144567 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
324-41144567
325 // handle incoming state first-
326 uchar remainingCharsData[4]; // longest UTF-8 sequence possible-
327 int remainingCharsCount = state->remainingChars;-
328 int newCharsToCopy = qMin<int>(sizeof(remainingCharsData) - remainingCharsCount, end - src);-
329-
330 memset(remainingCharsData, 0, sizeof(remainingCharsData));-
331 memcpy(remainingCharsData, &state->state_data[0], remainingCharsCount);-
332 memcpy(remainingCharsData + remainingCharsCount, src, newCharsToCopy);-
333-
334 const uchar *begin = &remainingCharsData[1];-
335 res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(remainingCharsData[0], dst, begin,-
336 static_cast<const uchar *>(remainingCharsData) + remainingCharsCount + newCharsToCopy);-
337 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
338 // special case for len == 0:-
339 // if we were supplied an empty string, terminate the previous, unfinished sequence with error-
340 ++invalid;-
341 *dst++ = replacement;-
342 } 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
343 // if we got EndOfString again, then there were too few bytes in src;-
344 // copy to our state and return-
345 state->remainingChars = remainingCharsCount + newCharsToCopy;-
346 memcpy(&state->state_data[0], remainingCharsData, state->remainingChars);-
347 return QString();
executed 80 times by 5 tests: return QString();
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
80
348 } 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
349 // eat the UTF-8 BOM-
350 headerdone = true;-
351 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
352 --dst;
executed 10 times by 2 tests: --dst;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
10
353 }
executed 27 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_Utf8
27
354-
355 // adjust src now that we have maybe consumed a few chars-
356 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
357 Q_ASSERT(res > remainingCharsCount);-
358 src += res - remainingCharsCount;-
359 }
executed 224 times by 6 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
224
360 }
executed 244 times by 6 tests: end of block
Executed by:
  • tst_QMimeDatabase
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
244
361 }
executed 41144811 times by 34 tests: end of block
Executed by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
41144811
362-
363 // main body, stateless decoding-
364 res = 0;-
365 const uchar *nextAscii = src;-
366 const uchar *start = src;-
367 while (res >= 0 && src < end) {
res >= 0Description
TRUEevaluated 85443410 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 44039858 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 41403552 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-85443410
368 if (src >= nextAscii && simdDecodeAscii(dst, nextAscii, src, end))
src >= nextAsciiDescription
TRUEevaluated 43730910 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 308948 times by 12 tests
Evaluated by:
  • tst_QMimeDatabase
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTemporaryDir
  • tst_QTemporaryFile
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_Utf8
simdDecodeAsci...cii, src, end)Description
TRUEevaluated 13415 times by 207 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 43717495 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
  • ...
13415-43730910
369 break;
executed 13415 times by 207 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
  • ...
13415
370-
371 ch = *src++;-
372 res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(ch, dst, src, end);-
373 if (!headerdone && res >= 0) {
!headerdoneDescription
TRUEevaluated 271317 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 43755126 times by 339 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 270432 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-43755126
374 headerdone = true;-
375 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 270281 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-270281
376 // eat the UTF-8 BOM (it can only appear at the beginning of the string).-
377 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
378 --dst;
executed 15 times by 3 tests: --dst;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
15
379 }
executed 151 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
  • tst_Utf8
151
380 }
executed 270432 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
  • ...
270432
381 if (res == QUtf8BaseTraits::Error) {
res == QUtf8BaseTraits::ErrorDescription
TRUEevaluated 1176 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
FALSEevaluated 44025267 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-44025267
382 res = 0;-
383 ++invalid;-
384 *dst++ = replacement;-
385 }
executed 1176 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Utf8
1176
386 }
executed 44026443 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
  • ...
44026443
387-
388 if (!state && res == QUtf8BaseTraits::EndOfString) {
!stateDescription
TRUEevaluated 272414 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 41144811 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
res == QUtf8Ba...s::EndOfStringDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextCodec
FALSEevaluated 272405 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-41144811
389 // unterminated UTF sequence-
390 *dst++ = QChar::ReplacementCharacter;-
391 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
392 *dst++ = QChar::ReplacementCharacter;
executed 5 times by 1 test: *dst++ = QChar::ReplacementCharacter;
Executed by:
  • tst_QTextCodec
5
393 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
9
394-
395 result.truncate(dst - (const ushort *)result.unicode());-
396 if (state) {
stateDescription
TRUEevaluated 41144811 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
FALSEevaluated 272414 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
  • ...
272414-41144811
397 state->invalidChars += invalid;-
398 if (headerdone)
headerdoneDescription
TRUEevaluated 41143704 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
FALSEevaluated 1107 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
1107-41143704
399 state->flags |= QTextCodec::IgnoreHeader;
executed 41143704 times by 34 tests: state->flags |= QTextCodec::IgnoreHeader;
Executed by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
41143704
400 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 41144562 times by 34 tests
Evaluated by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
249-41144562
401 --src; // unread the byte in ch-
402 state->remainingChars = end - src;-
403 memcpy(&state->state_data[0], src, end - src);-
404 } 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
405 state->remainingChars = 0;-
406 }
executed 41144562 times by 34 tests: end of block
Executed by:
  • 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_QFile
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QLayout
  • tst_QLocalSocket
  • tst_QLoggingRegistry
  • tst_QMimeDatabase
  • tst_QProcess
  • tst_QSettings
  • tst_QSplitter
  • tst_QTcpSocket
  • tst_QTemporaryDir
  • tst_QTextCodec
  • tst_QTextStream
  • ...
41144562
407 }-
408 return result;
executed 41417225 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
  • ...
41417225
409}-
410-
411QByteArray QUtf16::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e)-
412{-
413 DataEndianness endian = e;-
414 int length = 2*len;-
415 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
416 length += 2;-
417 }
executed 55 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
55
418 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
419 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
420 }
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
15
421-
422 QByteArray d;-
423 d.resize(length);-
424 char *data = d.data();-
425 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
426 QChar bom(QChar::ByteOrderMark);-
427 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
428 data[0] = bom.row();-
429 data[1] = bom.cell();-
430 } else {
executed 23 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
23
431 data[0] = bom.cell();-
432 data[1] = bom.row();-
433 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
32
434 data += 2;-
435 }
executed 55 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
55
436 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
437 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
438 *(data++) = uc[i].row();-
439 *(data++) = uc[i].cell();-
440 }
executed 206 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
206
441 } else {
executed 23 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
23
442 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
443 *(data++) = uc[i].cell();-
444 *(data++) = uc[i].row();-
445 }
executed 337 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
337
446 }
executed 45 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
45
447-
448 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
449 state->remainingChars = 0;-
450 state->flags |= QTextCodec::IgnoreHeader;-
451 }
executed 16 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
16
452 return d;
executed 68 times by 4 tests: return d;
Executed by:
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
68
453}-
454-
455QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e)-
456{-
457 DataEndianness endian = e;-
458 bool half = false;-
459 uchar buf = 0;-
460 bool headerdone = false;-
461 if (state) {
stateDescription
TRUEevaluated 1988 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233854 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-233854
462 headerdone = state->flags & QTextCodec::IgnoreHeader;-
463 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
464 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
465 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
466 half = true;-
467 buf = state->state_data[Data];-
468 }
executed 651 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
651
469 }
executed 1988 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1988
470 if (headerdone && endian == DetectEndianness)
headerdoneDescription
TRUEevaluated 1659 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 234183 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-234183
471 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
472-
473 QString result(len, Qt::Uninitialized); // worst case-
474 QChar *qch = (QChar *)result.data();-
475 while (len--) {
len--Description
TRUEevaluated 1186543 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 235842 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
235842-1186543
476 if (half) {
halfDescription
TRUEevaluated 593271 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 593272 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
593271-593272
477 QChar ch;-
478 if (endian == LittleEndianness) {
endian == LittleEndiannessDescription
TRUEevaluated 356728 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 236543 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
236543-356728
479 ch.setRow(*chars++);-
480 ch.setCell(buf);-
481 } else {
executed 356728 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
356728
482 ch.setRow(buf);-
483 ch.setCell(*chars++);-
484 }
executed 236543 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
236543
485 if (!headerdone) {
!headerdoneDescription
TRUEevaluated 234135 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 359136 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
234135-359136
486 headerdone = true;-
487 if (endian == DetectEndianness) {
endian == DetectEndiannessDescription
TRUEevaluated 233887 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-233887
488 if (ch == QChar::ByteOrderSwapped) {
ch == QChar::ByteOrderSwappedDescription
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233809 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-233809
489 endian = LittleEndianness;-
490 } 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 233806 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-233806
491 endian = BigEndianness;-
492 } else {
executed 3 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
3
493 if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
QSysInfo::Byte...nfo::BigEndianDescription
TRUEnever evaluated
FALSEevaluated 233806 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-233806
494 endian = BigEndianness;-
495 } else {
never executed: end of block
0
496 endian = LittleEndianness;-
497 ch = QChar((ch.unicode() >> 8) | ((ch.unicode() & 0xff) << 8));-
498 }
executed 233806 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
233806
499 *qch++ = ch;-
500 }
executed 233806 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
233806
501 } 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
502 *qch++ = ch;-
503 }
executed 4 times by 3 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
4
504 } else {
executed 234135 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
234135
505 *qch++ = ch;-
506 }
executed 359136 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
359136
507 half = false;-
508 } else {
executed 593271 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
593271
509 buf = *chars++;-
510 half = true;-
511 }
executed 593272 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
593272
512 }-
513 result.truncate(qch - result.unicode());-
514-
515 if (state) {
stateDescription
TRUEevaluated 1988 times by 4 tests
Evaluated by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
FALSEevaluated 233854 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-233854
516 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
517 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
518 state->state_data[Endian] = endian;-
519 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
520 state->remainingChars = 1;-
521 state->state_data[Data] = buf;-
522 } else {
executed 652 times by 3 tests: end of block
Executed by:
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
652
523 state->remainingChars = 0;-
524 state->state_data[Data] = 0;-
525 }
executed 1336 times by 4 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
1336
526 }-
527 return result;
executed 235842 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
235842
528}-
529-
530QByteArray QUtf32::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e)-
531{-
532 DataEndianness endian = e;-
533 int length = 4*len;-
534 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
535 length += 4;-
536 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
24
537 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
538 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
539 }
executed 11 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
11
540-
541 QByteArray d(length, Qt::Uninitialized);-
542 char *data = d.data();-
543 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
544 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
545 data[0] = 0;-
546 data[1] = 0;-
547 data[2] = (char)0xfe;-
548 data[3] = (char)0xff;-
549 } else {
executed 7 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
7
550 data[0] = (char)0xff;-
551 data[1] = (char)0xfe;-
552 data[2] = 0;-
553 data[3] = 0;-
554 }
executed 17 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
17
555 data += 4;-
556 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
24
557-
558 QStringIterator i(uc, uc + len);-
559 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
560 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
561 uint cp = i.next();-
562-
563 *(data++) = cp >> 24;-
564 *(data++) = (cp >> 16) & 0xff;-
565 *(data++) = (cp >> 8) & 0xff;-
566 *(data++) = cp & 0xff;-
567 }
executed 54 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
54
568 } else {
executed 7 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
7
569 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
570 uint cp = i.next();-
571-
572 *(data++) = cp & 0xff;-
573 *(data++) = (cp >> 8) & 0xff;-
574 *(data++) = (cp >> 16) & 0xff;-
575 *(data++) = cp >> 24;-
576 }
executed 122 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
122
577 }
executed 19 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
19
578-
579 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
580 state->remainingChars = 0;-
581 state->flags |= QTextCodec::IgnoreHeader;-
582 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
4
583 return d;
executed 26 times by 1 test: return d;
Executed by:
  • tst_QTextCodec
26
584}-
585-
586QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e)-
587{-
588 DataEndianness endian = e;-
589 uchar tuple[4];-
590 int num = 0;-
591 bool headerdone = false;-
592 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
593 headerdone = state->flags & QTextCodec::IgnoreHeader;-
594 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
595 endian = (DataEndianness)state->state_data[Endian];-
596 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QTextCodec
4
597 num = state->remainingChars;-
598 memcpy(tuple, &state->state_data[Data], 4);-
599 }
executed 364 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
364
600 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
601 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
602-
603 QString result;-
604 result.resize((num + len) >> 2 << 1); // worst case-
605 QChar *qch = (QChar *)result.data();-
606-
607 const char *end = chars + len;-
608 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
609 tuple[num++] = *chars++;-
610 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
611 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
612 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
613 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
614 endian = LittleEndianness;-
615 num = 0;-
616 continue;
executed 9 times by 1 test: continue;
Executed by:
  • tst_QTextCodec
9
617 } 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
618 endian = BigEndianness;-
619 num = 0;-
620 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QTextCodec
1
621 } 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
622 endian = BigEndianness;-
623 } else {
never executed: end of block
0
624 endian = LittleEndianness;-
625 }
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
626 } 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
627 num = 0;-
628 continue;
executed 47 times by 2 tests: continue;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
47
629 }-
630 }
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
631 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
632 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
633 *qch++ = QChar::highSurrogate(code);-
634 *qch++ = QChar::lowSurrogate(code);-
635 } else {
executed 58 times by 4 tests: end of block
Executed by:
  • tst_QString
  • tst_QStringIterator
  • tst_QXmlStream
  • tst_Utf8
58
636 *qch++ = code;-
637 }
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
638 num = 0;-
639 }
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
640 }
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
641 result.truncate(qch - result.unicode());-
642-
643 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
644 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
645 state->flags |= QTextCodec::IgnoreHeader;
executed 3 times by 1 test: state->flags |= QTextCodec::IgnoreHeader;
Executed by:
  • tst_QTextCodec
3
646 state->state_data[Endian] = endian;-
647 state->remainingChars = num;-
648 memcpy(&state->state_data[Data], tuple, 4);-
649 }
executed 364 times by 2 tests: end of block
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
364
650 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
651}-
652-
653-
654#ifndef QT_NO_TEXTCODEC-
655-
656QUtf8Codec::~QUtf8Codec()-
657{-
658}-
659-
660QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const-
661{-
662 return QUtf8::convertFromUnicode(uc, len, state);
executed 571197 times by 407 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
  • ...
571197
663}-
664-
665void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, ConverterState *state) const-
666{-
667 *target += QUtf8::convertToUnicode(chars, len, state);-
668}
executed 60357 times by 16 tests: end of block
Executed by:
  • 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_QMimeDatabase
  • tst_QTextCodec
  • tst_QXmlStream
  • tst_Selftests
  • tst_qdbusxml2cpp - unknown status
60357
669-
670QString QUtf8Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const-
671{-
672 return QUtf8::convertToUnicode(chars, len, state);
executed 41356948 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
  • ...
41356948
673}-
674-
675QByteArray QUtf8Codec::name() const-
676{-
677 return "UTF-8";
executed 370 times by 17 tests: return "UTF-8";
Executed by:
  • tst_QClipboard
  • tst_QDBusXmlParser
  • tst_QFile
  • tst_QGlobal
  • tst_QMimeData
  • tst_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QSettings
  • tst_QTextBrowser
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_qdbusxml2cpp - unknown status
370
678}-
679-
680int QUtf8Codec::mibEnum() const-
681{-
682 return 106;
executed 60599 times by 22 tests: return 106;
Executed by:
  • 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_QMimeDatabase
  • tst_QPlainTextEdit
  • tst_QTextCodec
  • tst_QTextEdit
  • tst_QTextStream
  • tst_QXmlInputSource
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_Utf8
  • tst_qdbusxml2cpp - unknown status
60599
683}-
684-
685QUtf16Codec::~QUtf16Codec()-
686{-
687}-
688-
689QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const-
690{-
691 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
692}-
693-
694QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const-
695{-
696 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
697}-
698-
699int QUtf16Codec::mibEnum() const-
700{-
701 return 1015;
executed 445 times by 3 tests: return 1015;
Executed by:
  • tst_QTextCodec
  • tst_QXmlSimpleReader
  • tst_QXmlStream
445
702}-
703-
704QByteArray QUtf16Codec::name() const-
705{-
706 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
707}-
708-
709QList<QByteArray> QUtf16Codec::aliases() const-
710{-
711 return QList<QByteArray>();
executed 143 times by 4 tests: return QList<QByteArray>();
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
143
712}-
713-
714int QUtf16BECodec::mibEnum() const-
715{-
716 return 1013;
executed 22 times by 3 tests: return 1013;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
22
717}-
718-
719QByteArray QUtf16BECodec::name() const-
720{-
721 return "UTF-16BE";
executed 159 times by 3 tests: return "UTF-16BE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
159
722}-
723-
724QList<QByteArray> QUtf16BECodec::aliases() const-
725{-
726 QList<QByteArray> list;-
727 return list;
executed 158 times by 3 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlStream
158
728}-
729-
730int QUtf16LECodec::mibEnum() const-
731{-
732 return 1014;
executed 22 times by 2 tests: return 1014;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
22
733}-
734-
735QByteArray QUtf16LECodec::name() const-
736{-
737 return "UTF-16LE";
executed 154 times by 4 tests: return "UTF-16LE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
154
738}-
739-
740QList<QByteArray> QUtf16LECodec::aliases() const-
741{-
742 QList<QByteArray> list;-
743 return list;
executed 150 times by 4 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QXmlSimpleReader
  • tst_QXmlStream
150
744}-
745-
746QUtf32Codec::~QUtf32Codec()-
747{-
748}-
749-
750QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const-
751{-
752 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
753}-
754-
755QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const-
756{-
757 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
758}-
759-
760int QUtf32Codec::mibEnum() const-
761{-
762 return 1017;
executed 17 times by 1 test: return 1017;
Executed by:
  • tst_QTextCodec
17
763}-
764-
765QByteArray QUtf32Codec::name() const-
766{-
767 return "UTF-32";
executed 131 times by 1 test: return "UTF-32";
Executed by:
  • tst_QTextCodec
131
768}-
769-
770QList<QByteArray> QUtf32Codec::aliases() const-
771{-
772 QList<QByteArray> list;-
773 return list;
executed 130 times by 1 test: return list;
Executed by:
  • tst_QTextCodec
130
774}-
775-
776int QUtf32BECodec::mibEnum() const-
777{-
778 return 1018;
executed 21 times by 2 tests: return 1018;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
21
779}-
780-
781QByteArray QUtf32BECodec::name() const-
782{-
783 return "UTF-32BE";
executed 135 times by 2 tests: return "UTF-32BE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
135
784}-
785-
786QList<QByteArray> QUtf32BECodec::aliases() const-
787{-
788 QList<QByteArray> list;-
789 return list;
executed 134 times by 2 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
134
790}-
791-
792int QUtf32LECodec::mibEnum() const-
793{-
794 return 1019;
executed 22 times by 2 tests: return 1019;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
22
795}-
796-
797QByteArray QUtf32LECodec::name() const-
798{-
799 return "UTF-32LE";
executed 132 times by 2 tests: return "UTF-32LE";
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
132
800}-
801-
802QList<QByteArray> QUtf32LECodec::aliases() const-
803{-
804 QList<QByteArray> list;-
805 return list;
executed 131 times by 2 tests: return list;
Executed by:
  • tst_QTextCodec
  • tst_QTextStream
131
806}-
807-
808#endif //QT_NO_TEXTCODEC-
809-
810QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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