OpenCoverage

qunicodetools.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qunicodetools.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtCore module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qunicodetools_p.h"-
41-
42#include "qunicodetables_p.h"-
43#include "qvarlengtharray.h"-
44-
45#include "qharfbuzz_p.h"-
46-
47#define FLAG(x) (1 << (x))-
48-
49QT_BEGIN_NAMESPACE-
50-
51Q_AUTOTEST_EXPORT int qt_initcharattributes_default_algorithm_only = 0;-
52-
53namespace QUnicodeTools {-
54-
55// ------------------------------------------------------------------------------------------------------
56//-
57// The text boundaries determination algorithm.-
58// See http://www.unicode.org/reports/tr29/tr29-27.html-
59//-
60// ------------------------------------------------------------------------------------------------------
61-
62namespace GB {-
63-
64static const uchar breakTable[QUnicodeTables::GraphemeBreak_LVT + 1][QUnicodeTables::GraphemeBreak_LVT + 1] = {-
65// Other CR LF Control Extend RI Prepend S-Mark L V T LV LVT-
66 { true , true , true , true , false, true , true , false, true , true , true , true , true }, // Other-
67 { true , true , false, true , true , true , true , true , true , true , true , true , true }, // CR-
68 { true , true , true , true , true , true , true , true , true , true , true , true , true }, // LF-
69 { true , true , true , true , true , true , true , true , true , true , true , true , true }, // Control-
70 { true , true , true , true , false, true , true , false, true , true , true , true , true }, // Extend-
71 { true , true , true , true , false, false, true , false, true , true , true , true , true }, // RegionalIndicator-
72 { false, true , true , true , false, false, false, false, false, false, false, false, false }, // Prepend-
73 { true , true , true , true , false, true , true , false, true , true , true , true , true }, // SpacingMark-
74 { true , true , true , true , false, true , true , false, false, false, true , false, false }, // L-
75 { true , true , true , true , false, true , true , false, true , false, false, true , true }, // V-
76 { true , true , true , true , false, true , true , false, true , true , false, true , true }, // T-
77 { true , true , true , true , false, true , true , false, true , false, false, true , true }, // LV-
78 { true , true , true , true , false, true , true , false, true , true , false, true , true }, // LVT-
79};-
80-
81} // namespace GB-
82-
83static void getGraphemeBreaks(const ushort *string, quint32 len, QCharAttributes *attributes)-
84{-
85 QUnicodeTables::GraphemeBreakClass lcls = QUnicodeTables::GraphemeBreak_LF; // to meet GB1-
86 for (quint32 i = 0; i != len; ++i) {
i != lenDescription
TRUEevaluated 5206695 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 207923 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207923-5206695
87 quint32 pos = i;-
88 uint ucs4 = string[i];-
89 if (QChar::isHighSurrogate(ucs4) && i + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 138 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 5206557 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
i + 1 != lenDescription
TRUEevaluated 110 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
28-5206557
90 ushort low = string[i + 1];-
91 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 82 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
28-82
92 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
93 ++i;-
94 }
executed 82 times by 2 tests: end of block
Executed by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
82
95 }
executed 110 times by 2 tests: end of block
Executed by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
110
96-
97 const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ucs4);-
98 QUnicodeTables::GraphemeBreakClass cls = (QUnicodeTables::GraphemeBreakClass) prop->graphemeBreakClass;-
99-
100 if (Q_LIKELY(GB::breakTable[lcls][cls]))
__builtin_expe...][cls]), true)Description
TRUEevaluated 5206286 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 409 times by 3 tests
Evaluated by:
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
409-5206286
101 attributes[pos].graphemeBoundary = true;
executed 5206286 times by 114 tests: attributes[pos].graphemeBoundary = true;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
5206286
102-
103 lcls = cls;-
104 }
executed 5206695 times by 114 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
5206695
105-
106 attributes[len].graphemeBoundary = true; // GB2-
107}
executed 207923 times by 114 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207923
108-
109-
110namespace WB {-
111-
112enum Action {-
113 NoBreak,-
114 Break,-
115 Lookup,-
116 LookupW-
117};-
118-
119static const uchar breakTable[QUnicodeTables::WordBreak_ExtendNumLet + 1][QUnicodeTables::WordBreak_ExtendNumLet + 1] = {-
120// Other CR LF Newline Extend RI Katakana HLetter ALetter SQuote DQuote MidNumLet MidLetter MidNum Numeric ExtendNumLet-
121 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Other-
122 { Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // CR-
123 { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // LF-
124 { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Newline-
125 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // Extend-
126 { Break , Break , Break , Break , NoBreak, NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // RegionalIndicator-
127 { Break , Break , Break , Break , NoBreak, Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , NoBreak }, // Katakana-
128 { Break , Break , Break , Break , NoBreak, Break , Break , NoBreak, NoBreak, LookupW, Lookup , LookupW, LookupW, Break , NoBreak, NoBreak }, // HebrewLetter-
129 { Break , Break , Break , Break , NoBreak, Break , Break , NoBreak, NoBreak, LookupW, Break , LookupW, LookupW, Break , NoBreak, NoBreak }, // ALetter-
130 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // SingleQuote-
131 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // DoubleQuote-
132 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidNumLet-
133 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidLetter-
134 { Break , Break , Break , Break , NoBreak, Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // MidNum-
135 { Break , Break , Break , Break , NoBreak, Break , Break , NoBreak, NoBreak, Lookup , Break , Lookup , Break , Lookup , NoBreak, NoBreak }, // Numeric-
136 { Break , Break , Break , Break , NoBreak, Break , NoBreak, NoBreak, NoBreak, Break , Break , Break , Break , Break , NoBreak, NoBreak }, // ExtendNumLet-
137};-
138-
139} // namespace WB-
140-
141static void getWordBreaks(const ushort *string, quint32 len, QCharAttributes *attributes)-
142{-
143 enum WordType {-
144 WordTypeNone, WordTypeAlphaNumeric, WordTypeHiraganaKatakana-
145 } currentWordType = WordTypeNone;-
146-
147 QUnicodeTables::WordBreakClass cls = QUnicodeTables::WordBreak_LF; // to meet WB1-
148 for (quint32 i = 0; i != len; ++i) {
i != lenDescription
TRUEevaluated 134912 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 1553 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1553-134912
149 quint32 pos = i;-
150 uint ucs4 = string[i];-
151 if (QChar::isHighSurrogate(ucs4) && i + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 127 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 134785 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
i + 1 != lenDescription
TRUEevaluated 127 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-134785
152 ushort low = string[i + 1];-
153 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 127 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-127
154 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
155 ++i;-
156 }
executed 127 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
127
157 }
executed 127 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
127
158-
159 const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ucs4);-
160 QUnicodeTables::WordBreakClass ncls = (QUnicodeTables::WordBreakClass) prop->wordBreakClass;-
161#ifdef QT_BUILD_INTERNAL-
162 if (qt_initcharattributes_default_algorithm_only) {
qt_initcharatt...algorithm_onlyDescription
TRUEevaluated 5127 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 129785 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
5127-129785
163 // as of Unicode 5.1, some punctuation marks were mapped to MidLetter and MidNumLet-
164 // which caused "hi.there" to be treated like if it were just a single word;-
165 // we keep the pre-5.1 behavior by remapping these characters in the Unicode tables generator-
166 // and this code is needed to pass the coverage tests; remove once the issue is fixed.-
167 if (ucs4 == 0x002E) // FULL STOP
ucs4 == 0x002EDescription
TRUEevaluated 290 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 4837 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
290-4837
168 ncls = QUnicodeTables::WordBreak_MidNumLet;
executed 290 times by 1 test: ncls = QUnicodeTables::WordBreak_MidNumLet;
Executed by:
  • tst_QTextBoundaryFinder
290
169 else if (ucs4 == 0x003A) // COLON
ucs4 == 0x003ADescription
TRUEevaluated 384 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 4453 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
384-4453
170 ncls = QUnicodeTables::WordBreak_MidLetter;
executed 384 times by 1 test: ncls = QUnicodeTables::WordBreak_MidLetter;
Executed by:
  • tst_QTextBoundaryFinder
384
171 }
executed 5127 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
5127
172#endif-
173-
174 uchar action = WB::breakTable[cls][ncls];-
175 switch (action) {-
176 case WB::Break:
executed 3856 times by 3 tests: case WB::Break:
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
3856
177 break;
executed 3856 times by 3 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
3856
178 case WB::NoBreak:
executed 130284 times by 3 tests: case WB::NoBreak:
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
130284
179 if (Q_UNLIKELY(ncls == QUnicodeTables::WordBreak_Extend)) {
__builtin_expe...xtend), false)Description
TRUEevaluated 1100 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 129184 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1100-129184
180 // WB4: X(Extend|Format)* -> X-
181 continue;
executed 1100 times by 1 test: continue;
Executed by:
  • tst_QTextBoundaryFinder
1100
182 }-
183 break;
executed 129184 times by 3 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
129184
184 case WB::Lookup:
executed 373 times by 1 test: case WB::Lookup:
Executed by:
  • tst_QTextBoundaryFinder
373
185 case WB::LookupW:
executed 399 times by 1 test: case WB::LookupW:
Executed by:
  • tst_QTextBoundaryFinder
399
186 for (quint32 lookahead = i + 1; lookahead < len; ++lookahead) {
lookahead < lenDescription
TRUEevaluated 818 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 362 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
362-818
187 ucs4 = string[lookahead];-
188 if (QChar::isHighSurrogate(ucs4) && lookahead + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 806 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
lookahead + 1 != lenDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-806
189 ushort low = string[lookahead + 1];-
190 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-12
191 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
192 ++lookahead;-
193 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
12
194 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
12
195-
196 prop = QUnicodeTables::properties(ucs4);-
197 QUnicodeTables::WordBreakClass tcls = (QUnicodeTables::WordBreakClass) prop->wordBreakClass;-
198-
199 if (Q_UNLIKELY(tcls == QUnicodeTables::WordBreak_Extend)) {
__builtin_expe...xtend), false)Description
TRUEevaluated 408 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 410 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
408-410
200 // WB4: X(Extend|Format)* -> X-
201 continue;
executed 408 times by 1 test: continue;
Executed by:
  • tst_QTextBoundaryFinder
408
202 }-
203-
204 if (Q_LIKELY(tcls == cls || (action == WB::LookupW && (tcls == QUnicodeTables::WordBreak_HebrewLetter
__builtin_expe...tter))), true)Description
TRUEevaluated 122 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 288 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
122-288
205 || tcls == QUnicodeTables::WordBreak_ALetter)))) {-
206 i = lookahead;-
207 ncls = tcls;-
208 action = WB::NoBreak;-
209 }
executed 122 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
122
210 break;
executed 410 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
410
211 }-
212 if (action != WB::NoBreak) {
action != WB::NoBreakDescription
TRUEevaluated 650 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 122 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
122-650
213 action = WB::Break;-
214 if (Q_UNLIKELY(ncls == QUnicodeTables::WordBreak_SingleQuote && cls == QUnicodeTables::WordBreak_HebrewLetter))
__builtin_expe...etter), false)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 648 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
2-648
215 action = WB::NoBreak; // WB7a
executed 2 times by 1 test: action = WB::NoBreak;
Executed by:
  • tst_QTextBoundaryFinder
2
216 }
executed 650 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
650
217 break;
executed 772 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
772
218 }-
219-
220 cls = ncls;-
221 if (action == WB::Break) {
action == WB::BreakDescription
TRUEevaluated 4504 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 129308 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
4504-129308
222 attributes[pos].wordBreak = true;-
223 if (currentWordType != WordTypeNone)
currentWordTyp...= WordTypeNoneDescription
TRUEevaluated 1294 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 3210 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1294-3210
224 attributes[pos].wordEnd = true;
executed 1294 times by 3 tests: attributes[pos].wordEnd = true;
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1294
225 switch (cls) {-
226 case QUnicodeTables::WordBreak_Katakana:
executed 100 times by 1 test: case QUnicodeTables::WordBreak_Katakana:
Executed by:
  • tst_QTextBoundaryFinder
100
227 currentWordType = WordTypeHiraganaKatakana;-
228 attributes[pos].wordStart = true;-
229 break;
executed 100 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
100
230 case QUnicodeTables::WordBreak_HebrewLetter:
executed 89 times by 1 test: case QUnicodeTables::WordBreak_HebrewLetter:
Executed by:
  • tst_QTextBoundaryFinder
89
231 case QUnicodeTables::WordBreak_ALetter:
executed 998 times by 3 tests: case QUnicodeTables::WordBreak_ALetter:
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
998
232 case QUnicodeTables::WordBreak_Numeric:
executed 564 times by 1 test: case QUnicodeTables::WordBreak_Numeric:
Executed by:
  • tst_QTextBoundaryFinder
564
233 currentWordType = WordTypeAlphaNumeric;-
234 attributes[pos].wordStart = true;-
235 break;
executed 1651 times by 3 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1651
236 default:
executed 2753 times by 3 tests: default:
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
2753
237 currentWordType = WordTypeNone;-
238 break;
executed 2753 times by 3 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
2753
239 }-
240 }-
241 }
executed 133812 times by 3 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
133812
242-
243 if (currentWordType != WordTypeNone)
currentWordTyp...= WordTypeNoneDescription
TRUEevaluated 457 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 1096 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
457-1096
244 attributes[len].wordEnd = true;
executed 457 times by 3 tests: attributes[len].wordEnd = true;
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
457
245 attributes[len].wordBreak = true; // WB2-
246}
executed 1553 times by 3 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1553
247-
248-
249namespace SB {-
250-
251enum State {-
252 Initial,-
253 Lower,-
254 Upper,-
255 LUATerm,-
256 ATerm,-
257 ATermC,-
258 ACS,-
259 STerm,-
260 STermC,-
261 SCS,-
262 BAfterC,-
263 BAfter,-
264 Break,-
265 Lookup-
266};-
267-
268static const uchar breakTable[BAfter + 1][QUnicodeTables::SentenceBreak_Close + 1] = {-
269// Other CR LF Sep Extend Sp Lower Upper OLetter Numeric ATerm SContinue STerm Close-
270 { Initial, BAfterC, BAfter , BAfter , Initial, Initial, Lower , Upper , Initial, Initial, ATerm , Initial, STerm , Initial }, // Initial-
271 { Initial, BAfterC, BAfter , BAfter , Lower , Initial, Initial, Initial, Initial, Initial, LUATerm, Initial, STerm , Initial }, // Lower-
272 { Initial, BAfterC, BAfter , BAfter , Upper , Initial, Initial, Upper , Initial, Initial, LUATerm, STerm , STerm , Initial }, // Upper-
273-
274 { Lookup , BAfterC, BAfter , BAfter , LUATerm, ACS , Initial, Upper , Break , Initial, ATerm , STerm , STerm , ATermC }, // LUATerm-
275 { Lookup , BAfterC, BAfter , BAfter , ATerm , ACS , Initial, Break , Break , Initial, ATerm , STerm , STerm , ATermC }, // ATerm-
276 { Lookup , BAfterC, BAfter , BAfter , ATermC , ACS , Initial, Break , Break , Lookup , ATerm , STerm , STerm , ATermC }, // ATermC-
277 { Lookup , BAfterC, BAfter , BAfter , ACS , ACS , Initial, Break , Break , Lookup , ATerm , STerm , STerm , Lookup }, // ACS-
278-
279 { Break , BAfterC, BAfter , BAfter , STerm , SCS , Break , Break , Break , Break , ATerm , STerm , STerm , STermC }, // STerm,-
280 { Break , BAfterC, BAfter , BAfter , STermC , SCS , Break , Break , Break , Break , ATerm , STerm , STerm , STermC }, // STermC-
281 { Break , BAfterC, BAfter , BAfter , SCS , SCS , Break , Break , Break , Break , ATerm , STerm , STerm , Break }, // SCS-
282 { Break , Break , BAfter , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // BAfterC-
283 { Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break , Break }, // BAfter-
284};-
285-
286} // namespace SB-
287-
288static void getSentenceBreaks(const ushort *string, quint32 len, QCharAttributes *attributes)-
289{-
290 uchar state = SB::BAfter; // to meet SB1-
291 for (quint32 i = 0; i != len; ++i) {
i != lenDescription
TRUEevaluated 2339 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
FALSEevaluated 521 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
521-2339
292 quint32 pos = i;-
293 uint ucs4 = string[i];-
294 if (QChar::isHighSurrogate(ucs4) && i + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 2330 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
i + 1 != lenDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-2330
295 ushort low = string[i + 1];-
296 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-9
297 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
298 ++i;-
299 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
9
300 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
9
301-
302 const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ucs4);-
303 QUnicodeTables::SentenceBreakClass ncls = (QUnicodeTables::SentenceBreakClass) prop->sentenceBreakClass;-
304-
305 Q_ASSERT(state <= SB::BAfter);-
306 state = SB::breakTable[state][ncls];-
307 if (Q_UNLIKELY(state == SB::Lookup)) { // SB8
__builtin_expe...ookup), false)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 2331 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
8-2331
308 state = SB::Break;-
309 for (quint32 lookahead = i + 1; lookahead < len; ++lookahead) {
lookahead < lenDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
2-15
310 ucs4 = string[lookahead];-
311 if (QChar::isHighSurrogate(ucs4) && lookahead + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
lookahead + 1 != lenDescription
TRUEnever evaluated
FALSEnever evaluated
0-15
312 ushort low = string[lookahead + 1];-
313 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEnever evaluated
FALSEnever evaluated
0
314 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
315 ++lookahead;-
316 }
never executed: end of block
0
317 }
never executed: end of block
0
318-
319 prop = QUnicodeTables::properties(ucs4);-
320 QUnicodeTables::SentenceBreakClass tcls = (QUnicodeTables::SentenceBreakClass) prop->sentenceBreakClass;-
321 switch (tcls) {-
322 case QUnicodeTables::SentenceBreak_Other:
never executed: case QUnicodeTables::SentenceBreak_Other:
0
323 case QUnicodeTables::SentenceBreak_Extend:
executed 5 times by 1 test: case QUnicodeTables::SentenceBreak_Extend:
Executed by:
  • tst_QTextBoundaryFinder
5
324 case QUnicodeTables::SentenceBreak_Sp:
never executed: case QUnicodeTables::SentenceBreak_Sp:
0
325 case QUnicodeTables::SentenceBreak_Numeric:
never executed: case QUnicodeTables::SentenceBreak_Numeric:
0
326 case QUnicodeTables::SentenceBreak_SContinue:
never executed: case QUnicodeTables::SentenceBreak_SContinue:
0
327 case QUnicodeTables::SentenceBreak_Close:
executed 4 times by 1 test: case QUnicodeTables::SentenceBreak_Close:
Executed by:
  • tst_QTextBoundaryFinder
4
328 continue;
executed 9 times by 1 test: continue;
Executed by:
  • tst_QTextBoundaryFinder
9
329 case QUnicodeTables::SentenceBreak_Lower:
executed 2 times by 1 test: case QUnicodeTables::SentenceBreak_Lower:
Executed by:
  • tst_QTextBoundaryFinder
2
330 i = lookahead;-
331 state = SB::Initial;-
332 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
2
333 default:
executed 4 times by 1 test: default:
Executed by:
  • tst_QTextBoundaryFinder
4
334 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
4
335 }-
336 break;
executed 6 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
6
337 }-
338 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_QTextBoundaryFinder
8
339 if (Q_UNLIKELY(state == SB::Break)) {
__builtin_expe...Break), false)Description
TRUEevaluated 672 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
FALSEevaluated 1667 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
672-1667
340 attributes[pos].sentenceBoundary = true;-
341 state = SB::breakTable[SB::Initial][ncls];-
342 }
executed 672 times by 2 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
672
343 }
executed 2339 times by 2 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
2339
344-
345 attributes[len].sentenceBoundary = true; // SB2-
346}
executed 521 times by 2 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
521
347-
348-
349// ------------------------------------------------------------------------------------------------------
350//-
351// The line breaking algorithm.-
352// See http://www.unicode.org/reports/tr14/tr14-35.html-
353//-
354// ------------------------------------------------------------------------------------------------------
355-
356namespace LB {-
357-
358namespace NS { // Number Sequence-
359-
360// LB25 recommends to not break lines inside numbers of the form-
361// described by the following regular expression:-
362// (PR|PO)?(OP|HY)?NU(NU|SY|IS)*(CL|CP)?(PR|PO)?-
363-
364enum Action {-
365 None,-
366 Start,-
367 Continue,-
368 Break-
369};-
370-
371enum Class {-
372 XX,-
373 PRPO,-
374 OPHY,-
375 NU,-
376 SYIS,-
377 CLCP-
378};-
379-
380static const uchar actionTable[CLCP + 1][CLCP + 1] = {-
381// XX PRPO OPHY NU SYIS CLCP-
382 { None , Start , Start , Start , None , None }, // XX-
383 { None , Start , Continue, Continue, None , None }, // PRPO-
384 { None , Start , Start , Continue, None , None }, // OPHY-
385 { Break , Break , Break , Continue, Continue, Continue }, // NU-
386 { Break , Break , Break , Continue, Continue, Continue }, // SYIS-
387 { Break , Continue, Break , Break , Break , Break }, // CLCP-
388};-
389-
390inline Class toClass(QUnicodeTables::LineBreakClass lbc, QChar::Category category)-
391{-
392 switch (lbc) {-
393 case QUnicodeTables::LineBreak_AL:// case QUnicodeTables::LineBreak_AI:
executed 3461344 times by 109 tests: case QUnicodeTables::LineBreak_AL:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
3461344
394 // resolve AI math symbols in numerical context to IS-
395 if (category == QChar::Symbol_Math)
category == QChar::Symbol_MathDescription
TRUEevaluated 2604 times by 13 tests
Evaluated by:
  • tst_QComplexText
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QShortcut
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTreeView
  • tst_QWizard
FALSEevaluated 3458740 times by 109 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
2604-3458740
396 return SYIS;
executed 2604 times by 13 tests: return SYIS;
Executed by:
  • tst_QComplexText
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QShortcut
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTreeView
  • tst_QWizard
2604
397 break;
executed 3458740 times by 109 tests: break;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
3458740
398 case QUnicodeTables::LineBreak_PR: case QUnicodeTables::LineBreak_PO:
executed 4431 times by 23 tests: case QUnicodeTables::LineBreak_PR:
Executed by:
  • tst_QBoxLayout
  • tst_QColumnView
  • tst_QComplexText
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QKeySequenceEdit
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QPushButton
  • tst_QShortcut
  • tst_QSpinBox
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • tst_QTextLayout
executed 477 times by 8 tests: case QUnicodeTables::LineBreak_PO:
Executed by:
  • tst_QComplexText
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
477-4431
399 return PRPO;
executed 4908 times by 26 tests: return PRPO;
Executed by:
  • tst_QBoxLayout
  • tst_QColumnView
  • tst_QComplexText
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QKeySequenceEdit
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QPushButton
  • tst_QShortcut
  • tst_QSpinBox
  • tst_QStackedLayout
  • tst_QStyleSheetStyle
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • ...
4908
400 case QUnicodeTables::LineBreak_OP: case QUnicodeTables::LineBreak_HY:
executed 7892 times by 26 tests: case QUnicodeTables::LineBreak_OP:
Executed by:
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QTableView
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
executed 75165 times by 33 tests: case QUnicodeTables::LineBreak_HY:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QSpinBox
  • tst_QStackedLayout
  • tst_QStandardItemModel
  • ...
7892-75165
401 return OPHY;
executed 83057 times by 41 tests: return OPHY;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • ...
83057
402 case QUnicodeTables::LineBreak_NU:
executed 990330 times by 75 tests: case QUnicodeTables::LineBreak_NU:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
990330
403 return NU;
executed 990330 times by 75 tests: return NU;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGlyphRun
  • ...
990330
404 case QUnicodeTables::LineBreak_SY: case QUnicodeTables::LineBreak_IS:
executed 91544 times by 24 tests: case QUnicodeTables::LineBreak_SY:
Executed by:
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QListView
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
  • tst_QTreeView
  • tst_languageChange
executed 139841 times by 47 tests: case QUnicodeTables::LineBreak_IS:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QKeySequenceEdit
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • ...
91544-139841
405 return SYIS;
executed 231385 times by 51 tests: return SYIS;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QKeySequenceEdit
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • ...
231385
406 case QUnicodeTables::LineBreak_CL: case QUnicodeTables::LineBreak_CP:
executed 472 times by 9 tests: case QUnicodeTables::LineBreak_CL:
Executed by:
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QTextBoundaryFinder
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
executed 7483 times by 24 tests: case QUnicodeTables::LineBreak_CP:
Executed by:
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QTableView
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
472-7483
407 return CLCP;
executed 7955 times by 26 tests: return CLCP;
Executed by:
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMdiArea
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QProgressBar
  • tst_QTableView
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTreeView
  • tst_QTreeWidget
  • ...
7955
408 default:
executed 443334 times by 87 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
443334
409 break;
executed 443334 times by 87 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
443334
410 }-
411 return XX;
executed 3902074 times by 110 tests: return XX;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
3902074
412}-
413-
414} // namespace NS-
415-
416/* In order to support the tailored implementation of LB25 properly-
417 the following changes were made in the pair table to allow breaks-
418 where the numeric expression doesn't match the template (i.e. [^NU](IS|SY)NU):-
419 (CL)(PO) from IB to DB-
420 (CP)(PO) from IB to DB-
421 (CL)(PR) from IB to DB-
422 (CP)(PR) from IB to DB-
423 (PO)(OP) from IB to DB-
424 (PR)(OP) from IB to DB-
425 (IS)(NU) from IB to DB-
426 (SY)(NU) from IB to DB-
427*/-
428-
429/* In order to implementat LB21a properly a special rule HH has been introduced and-
430 the following changes were made in the pair table to disallow breaks after Hebrew + Hyphen:-
431 (HL)(HY|BA) from IB to CI-
432 (HY|BA)(!CB) from DB to HH-
433*/-
434-
435enum Action {-
436 ProhibitedBreak, PB = ProhibitedBreak,-
437 DirectBreak, DB = DirectBreak,-
438 IndirectBreak, IB = IndirectBreak,-
439 CombiningIndirectBreak, CI = CombiningIndirectBreak,-
440 CombiningProhibitedBreak, CP = CombiningProhibitedBreak,-
441 ProhibitedBreakAfterHebrewPlusHyphen, HH = ProhibitedBreakAfterHebrewPlusHyphen-
442};-
443-
444static const uchar breakTable[QUnicodeTables::LineBreak_CB + 1][QUnicodeTables::LineBreak_CB + 1] = {-
445/* OP CL CP QU GL NS EX SY IS PR PO NU AL HL ID IN HY BA BB B2 ZW CM WJ H2 H3 JL JV JT RI CB */-
446/* OP */ { PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, CP, PB, PB, PB, PB, PB, PB, PB, PB },-
447/* CL */ { DB, PB, PB, IB, IB, PB, PB, PB, PB, DB, DB, DB, DB, DB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
448/* CP */ { DB, PB, PB, IB, IB, PB, PB, PB, PB, DB, DB, IB, IB, IB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
449/* QU */ { PB, PB, PB, IB, IB, IB, PB, PB, PB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, PB, CI, PB, IB, IB, IB, IB, IB, IB, IB },-
450/* GL */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, PB, CI, PB, IB, IB, IB, IB, IB, IB, IB },-
451/* NS */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, DB, DB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
452/* EX */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
453/* SY */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, DB, IB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
454/* IS */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, IB, IB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
455/* PR */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, IB, IB, IB, IB, DB, IB, IB, DB, DB, PB, CI, PB, IB, IB, IB, IB, IB, DB, DB },-
456/* PO */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, IB, IB, IB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
457/* NU */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, IB, IB, IB, IB, IB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
458/* AL */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, IB, IB, IB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
459/* HL */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, IB, IB, IB, DB, IB, CI, CI, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
460/* ID */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, IB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
461/* IN */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
462/* HY */ { HH, PB, PB, IB, HH, IB, PB, PB, PB, HH, HH, IB, HH, HH, HH, HH, IB, IB, HH, HH, PB, CI, PB, HH, HH, HH, HH, HH, HH, DB },-
463/* BA */ { HH, PB, PB, IB, HH, IB, PB, PB, PB, HH, HH, HH, HH, HH, HH, HH, IB, IB, HH, HH, PB, CI, PB, HH, HH, HH, HH, HH, HH, DB },-
464/* BB */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, PB, CI, PB, IB, IB, IB, IB, IB, IB, DB },-
465/* B2 */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, DB, DB, DB, DB, IB, IB, DB, PB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
466/* ZW */ { DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, PB, DB, DB, DB, DB, DB, DB, DB, DB, DB },-
467/* CM */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, IB, IB, IB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB },-
468/* WJ */ { IB, PB, PB, IB, IB, IB, PB, PB, PB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, IB, PB, CI, PB, IB, IB, IB, IB, IB, IB, IB },-
469/* H2 */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, IB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, IB, IB, DB, DB },-
470/* H3 */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, IB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, IB, DB, DB },-
471/* JL */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, IB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, IB, IB, IB, IB, DB, DB, DB },-
472/* JV */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, IB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, IB, IB, DB, DB },-
473/* JT */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, IB, DB, DB, DB, DB, IB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, IB, DB, DB },-
474/* RI */ { DB, PB, PB, IB, IB, IB, PB, PB, PB, DB, DB, DB, DB, DB, DB, DB, IB, IB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, IB, DB },-
475/* CB */ { DB, PB, PB, IB, IB, DB, PB, PB, PB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, DB, PB, CI, PB, DB, DB, DB, DB, DB, DB, DB }-
476};-
477-
478// The following line break classes are not treated by the pair table-
479// and must be resolved outside:-
480// AI, BK, CB, CJ, CR, LF, NL, SA, SG, SP, XX-
481-
482} // namespace LB-
483-
484static void getLineBreaks(const ushort *string, quint32 len, QCharAttributes *attributes)-
485{-
486 quint32 nestart = 0;-
487 LB::NS::Class nelast = LB::NS::XX;-
488-
489 QUnicodeTables::LineBreakClass lcls = QUnicodeTables::LineBreak_LF; // to meet LB10-
490 QUnicodeTables::LineBreakClass cls = lcls;-
491 for (quint32 i = 0; i != len; ++i) {
i != lenDescription
TRUEevaluated 5225275 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 213827 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
213827-5225275
492 quint32 pos = i;-
493 uint ucs4 = string[i];-
494 if (QChar::isHighSurrogate(ucs4) && i + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 650 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 5224625 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
i + 1 != lenDescription
TRUEevaluated 650 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEnever evaluated
0-5224625
495 ushort low = string[i + 1];-
496 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 650 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEnever evaluated
0-650
497 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
498 ++i;-
499 }
executed 650 times by 2 tests: end of block
Executed by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
650
500 }
executed 650 times by 2 tests: end of block
Executed by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
650
501-
502 const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ucs4);-
503 QUnicodeTables::LineBreakClass ncls = (QUnicodeTables::LineBreakClass) prop->lineBreakClass;-
504-
505 if (Q_UNLIKELY(ncls == QUnicodeTables::LineBreak_SA)) {
__builtin_expe...ak_SA), false)Description
TRUEevaluated 1374 times by 3 tests
Evaluated by:
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 5223901 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
1374-5223901
506 // LB1: resolve SA to AL, except of those that have Category Mn or Mc be resolved to CM-
507 static const int test = FLAG(QChar::Mark_NonSpacing) | FLAG(QChar::Mark_SpacingCombining);-
508 if (FLAG(prop->category) & test)
(1 << (prop->category)) & testDescription
TRUEevaluated 190 times by 2 tests
Evaluated by:
  • tst_QLabel
  • tst_QTextLayout
FALSEevaluated 1184 times by 3 tests
Evaluated by:
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
190-1184
509 ncls = QUnicodeTables::LineBreak_CM;
executed 190 times by 2 tests: ncls = QUnicodeTables::LineBreak_CM;
Executed by:
  • tst_QLabel
  • tst_QTextLayout
190
510 }
executed 1374 times by 3 tests: end of block
Executed by:
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1374
511 if (Q_UNLIKELY(ncls == QUnicodeTables::LineBreak_CM)) {
__builtin_expe...ak_CM), false)Description
TRUEevaluated 3747 times by 4 tests
Evaluated by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 5221528 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
3747-5221528
512 // LB10: treat CM that follows SP, BK, CR, LF, NL, or ZW as AL-
513 if (lcls == QUnicodeTables::LineBreak_ZW || lcls >= QUnicodeTables::LineBreak_SP)
lcls == QUnico...::LineBreak_ZWDescription
TRUEevaluated 79 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 3668 times by 4 tests
Evaluated by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
lcls >= QUnico...::LineBreak_SPDescription
TRUEevaluated 706 times by 2 tests
Evaluated by:
  • tst_QComplexText
  • tst_QTextBoundaryFinder
FALSEevaluated 2962 times by 4 tests
Evaluated by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
79-3668
514 ncls = QUnicodeTables::LineBreak_AL;
executed 785 times by 2 tests: ncls = QUnicodeTables::LineBreak_AL;
Executed by:
  • tst_QComplexText
  • tst_QTextBoundaryFinder
785
515 }
executed 3747 times by 4 tests: end of block
Executed by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
3747
516-
517 if (Q_LIKELY(ncls != QUnicodeTables::LineBreak_CM)) {
__builtin_expe...eak_CM), true)Description
TRUEevaluated 5222313 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 2962 times by 4 tests
Evaluated by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
2962-5222313
518 // LB25: do not break lines inside numbers-
519 LB::NS::Class necur = LB::NS::toClass(ncls, (QChar::Category)prop->category);-
520 switch (LB::NS::actionTable[nelast][necur]) {-
521 case LB::NS::Break:
executed 149502 times by 47 tests: case LB::NS::Break:
Executed by:
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • ...
149502
522 // do not change breaks before and after the expression-
523 for (quint32 j = nestart + 1; j < pos; ++j)
j < posDescription
TRUEevaluated 134928 times by 36 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
FALSEevaluated 149502 times by 47 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • ...
134928-149502
524 attributes[j].lineBreak = false;
executed 134928 times by 36 tests: attributes[j].lineBreak = false;
Executed by:
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
134928
525 // fall through-
526 case LB::NS::None:
code before this statement executed 149502 times by 47 tests: case LB::NS::None:
Executed by:
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • ...
executed 3947139 times by 109 tests: case LB::NS::None:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
149502-3947139
527 nelast = LB::NS::XX; // reset state-
528 break;
executed 4096641 times by 111 tests: break;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
4096641
529 case LB::NS::Start:
executed 373172 times by 80 tests: case LB::NS::Start:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
373172
530 nestart = i;-
531 // fall through-
532 default:
code before this statement executed 373172 times by 80 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
executed 752500 times by 53 tests: default:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • ...
373172-752500
533 nelast = necur;-
534 break;
executed 1125672 times by 80 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
1125672
535 }-
536 }-
537-
538 if (Q_UNLIKELY(lcls >= QUnicodeTables::LineBreak_CR)) {
__builtin_expe...ak_CR), false)Description
TRUEevaluated 223542 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 5001733 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
223542-5001733
539 // LB4: BK!, LB5: (CRxLF|CR|LF|NL)!-
540 if (lcls > QUnicodeTables::LineBreak_CR || ncls != QUnicodeTables::LineBreak_LF)
lcls > QUnicod...::LineBreak_CRDescription
TRUEevaluated 223378 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 164 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
ncls != QUnico...::LineBreak_LFDescription
TRUEevaluated 159 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
5-223378
541 attributes[pos].lineBreak = attributes[pos].mandatoryBreak = true;
executed 223537 times by 114 tests: attributes[pos].lineBreak = attributes[pos].mandatoryBreak = true;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
223537
542 goto next;
executed 223542 times by 114 tests: goto next;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
223542
543 }-
544-
545 if (Q_UNLIKELY(ncls >= QUnicodeTables::LineBreak_SP)) {
__builtin_expe...ak_SP), false)Description
TRUEevaluated 429241 times by 84 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
FALSEevaluated 4572492 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
429241-4572492
546 if (ncls > QUnicodeTables::LineBreak_SP)
ncls > QUnicod...::LineBreak_SPDescription
TRUEevaluated 9788 times by 14 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QItemDelegate
  • tst_QListView
  • tst_QPlainTextEdit
  • tst_QStackedLayout
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextDocument
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QWizard
FALSEevaluated 419453 times by 84 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
9788-419453
547 goto next; // LB6: x(BK|CR|LF|NL)
executed 9788 times by 14 tests: goto next;
Executed by:
  • tst_QAccessibility
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QItemDelegate
  • tst_QListView
  • tst_QPlainTextEdit
  • tst_QStackedLayout
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextDocument
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QWizard
9788
548 goto next_no_cls_update; // LB7: xSP
executed 419453 times by 84 tests: goto next_no_cls_update;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
419453
549 }-
550-
551 // for South East Asian chars that require a complex analysis, the Unicode-
552 // standard recommends to treat them as AL. tailoring that do dictionary analysis can override-
553 if (Q_UNLIKELY(cls >= QUnicodeTables::LineBreak_SA))
__builtin_expe...ak_SA), false)Description
TRUEevaluated 1350 times by 11 tests
Evaluated by:
  • tst_QDateTimeEdit
  • tst_QGraphicsItem
  • tst_QInputDialog
  • tst_QLabel
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QSyntaxHighlighter
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextLayout
  • tst_QWizard
FALSEevaluated 4571142 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
1350-4571142
554 cls = QUnicodeTables::LineBreak_AL;
executed 1350 times by 11 tests: cls = QUnicodeTables::LineBreak_AL;
Executed by:
  • tst_QDateTimeEdit
  • tst_QGraphicsItem
  • tst_QInputDialog
  • tst_QLabel
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QSyntaxHighlighter
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextLayout
  • tst_QWizard
1350
555-
556 switch (LB::breakTable[cls][ncls < QUnicodeTables::LineBreak_SA ? ncls : QUnicodeTables::LineBreak_AL]) {-
557 case LB::DirectBreak:
executed 84719 times by 43 tests: case LB::DirectBreak:
Executed by:
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QKeySequenceEdit
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • ...
84719
558 attributes[pos].lineBreak = true;-
559 break;
executed 84719 times by 43 tests: break;
Executed by:
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QColumnView
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QKeySequenceEdit
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • ...
84719
560 case LB::IndirectBreak:
executed 4173176 times by 112 tests: case LB::IndirectBreak:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
4173176
561 if (lcls == QUnicodeTables::LineBreak_SP)
lcls == QUnico...::LineBreak_SPDescription
TRUEevaluated 411372 times by 82 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
FALSEevaluated 3761804 times by 112 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
411372-3761804
562 attributes[pos].lineBreak = true;
executed 411372 times by 82 tests: attributes[pos].lineBreak = true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
411372
563 break;
executed 4173176 times by 112 tests: break;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
4173176
564 case LB::CombiningIndirectBreak:
executed 2898 times by 4 tests: case LB::CombiningIndirectBreak:
Executed by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
2898
565 if (lcls != QUnicodeTables::LineBreak_SP)
lcls != QUnico...::LineBreak_SPDescription
TRUEevaluated 2894 times by 4 tests
Evaluated by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
4-2894
566 goto next_no_cls_update;
executed 2894 times by 4 tests: goto next_no_cls_update;
Executed by:
  • tst_QComplexText
  • tst_QLabel
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
2894
567 attributes[pos].lineBreak = true;-
568 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QTextBoundaryFinder
4
569 case LB::CombiningProhibitedBreak:
executed 82 times by 1 test: case LB::CombiningProhibitedBreak:
Executed by:
  • tst_QTextBoundaryFinder
82
570 if (lcls != QUnicodeTables::LineBreak_SP)
lcls != QUnico...::LineBreak_SPDescription
TRUEevaluated 82 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEnever evaluated
0-82
571 goto next_no_cls_update;
executed 82 times by 1 test: goto next_no_cls_update;
Executed by:
  • tst_QTextBoundaryFinder
82
572 break;
never executed: break;
0
573 case LB::ProhibitedBreakAfterHebrewPlusHyphen:
executed 65281 times by 26 tests: case LB::ProhibitedBreakAfterHebrewPlusHyphen:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QStackedLayout
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextFormat
  • tst_QTextLayout
  • tst_QTreeView
  • ...
65281
574 if (lcls != QUnicodeTables::LineBreak_HL)
lcls != QUnico...::LineBreak_HLDescription
TRUEevaluated 65281 times by 26 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QStackedLayout
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextFormat
  • tst_QTextLayout
  • tst_QTreeView
  • ...
FALSEnever evaluated
0-65281
575 attributes[pos].lineBreak = true;
executed 65281 times by 26 tests: attributes[pos].lineBreak = true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QStackedLayout
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextFormat
  • tst_QTextLayout
  • tst_QTreeView
  • ...
65281
576 break;
executed 65281 times by 26 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QBoxLayout
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QStackedLayout
  • tst_QTextBoundaryFinder
  • tst_QTextCursor
  • tst_QTextDocumentLayout
  • tst_QTextEdit
  • tst_QTextFormat
  • tst_QTextLayout
  • tst_QTreeView
  • ...
65281
577 case LB::ProhibitedBreak:
executed 246336 times by 56 tests: case LB::ProhibitedBreak:
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QKeySequenceEdit
  • tst_QLabel
  • ...
246336
578 // nothing to do-
579 default:
never executed: default:
0
580 break;
executed 246336 times by 56 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QKeySequenceEdit
  • tst_QLabel
  • ...
246336
581 }-
582-
583 next:
code before this statement executed 4569516 times by 113 tests: next:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
4569516
584 cls = ncls;-
585 next_no_cls_update:
code before this statement executed 4802846 times by 114 tests: next_no_cls_update:
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
4802846
586 lcls = ncls;-
587 }
executed 5225275 times by 114 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
5225275
588-
589 if (Q_UNLIKELY(LB::NS::actionTable[nelast][LB::NS::XX] == LB::NS::Break)) {
__builtin_expe...Break), false)Description
TRUEevaluated 151266 times by 68 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • ...
FALSEevaluated 62561 times by 108 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
62561-151266
590 // LB25: do not break lines inside numbers-
591 for (quint32 j = nestart + 1; j < len; ++j)
j < lenDescription
TRUEevaluated 617611 times by 44 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • ...
FALSEevaluated 151266 times by 68 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • ...
151266-617611
592 attributes[j].lineBreak = false;
executed 617611 times by 44 tests: attributes[j].lineBreak = false;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QComplexText
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • ...
617611
593 }
executed 151266 times by 68 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • ...
151266
594-
595 attributes[0].lineBreak = attributes[0].mandatoryBreak = false; // LB2-
596 attributes[len].lineBreak = attributes[len].mandatoryBreak = true; // LB3-
597}
executed 213827 times by 114 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
213827
598-
599-
600static void getWhiteSpaces(const ushort *string, quint32 len, QCharAttributes *attributes)-
601{-
602 for (quint32 i = 0; i != len; ++i) {
i != lenDescription
TRUEevaluated 5204972 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 207489 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207489-5204972
603 uint ucs4 = string[i];-
604 if (QChar::isHighSurrogate(ucs4) && i + 1 != len) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextLayout
FALSEevaluated 5204969 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
i + 1 != lenDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextLayout
FALSEnever evaluated
0-5204969
605 ushort low = string[i + 1];-
606 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTextLayout
FALSEnever evaluated
0-3
607 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
608 ++i;-
609 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QTextLayout
3
610 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QTextLayout
3
611-
612 if (Q_UNLIKELY(QChar::isSpace(ucs4)))
__builtin_expe...ucs4)), false)Description
TRUEevaluated 426158 times by 85 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
FALSEevaluated 4778814 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
426158-4778814
613 attributes[i].whiteSpace = true;
executed 426158 times by 85 tests: attributes[i].whiteSpace = true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • ...
426158
614 }
executed 5204972 times by 113 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
5204972
615}
executed 207489 times by 113 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207489
616-
617-
618Q_CORE_EXPORT void initCharAttributes(const ushort *string, int length,-
619 const ScriptItem *items, int numItems,-
620 QCharAttributes *attributes, CharAttributeOptions options)-
621{-
622 if (length <= 0)
length <= 0Description
TRUEevaluated 29 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QTabBar
  • tst_QTabWidget
  • tst_QTextCursor
  • tst_QTextLayout
FALSEevaluated 216335 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
29-216335
623 return;
executed 29 times by 8 tests: return;
Executed by:
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QTabBar
  • tst_QTabWidget
  • tst_QTextCursor
  • tst_QTextLayout
29
624-
625 if (!(options & DontClearAttributes))
!(options & Do...earAttributes)Description
TRUEevaluated 216335 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEnever evaluated
0-216335
626 ::memset(attributes, 0, (length + 1) * sizeof(QCharAttributes));
executed 216335 times by 114 tests: ::memset(attributes, 0, (length + 1) * sizeof(QCharAttributes));
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
216335
627-
628 if (options & GraphemeBreaks)
options & GraphemeBreaksDescription
TRUEevaluated 207923 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 8412 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
8412-207923
629 getGraphemeBreaks(string, length, attributes);
executed 207923 times by 114 tests: getGraphemeBreaks(string, length, attributes);
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207923
630 if (options & WordBreaks)
options & WordBreaksDescription
TRUEevaluated 1553 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 214782 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
1553-214782
631 getWordBreaks(string, length, attributes);
executed 1553 times by 3 tests: getWordBreaks(string, length, attributes);
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
1553
632 if (options & SentenceBreaks)
options & SentenceBreaksDescription
TRUEevaluated 521 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
FALSEevaluated 215814 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
521-215814
633 getSentenceBreaks(string, length, attributes);
executed 521 times by 2 tests: getSentenceBreaks(string, length, attributes);
Executed by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
521
634 if (options & LineBreaks)
options & LineBreaksDescription
TRUEevaluated 213827 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 2508 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
2508-213827
635 getLineBreaks(string, length, attributes);
executed 213827 times by 114 tests: getLineBreaks(string, length, attributes);
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
213827
636 if (options & WhiteSpaces)
options & WhiteSpacesDescription
TRUEevaluated 207489 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 8846 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
8846-207489
637 getWhiteSpaces(string, length, attributes);
executed 207489 times by 113 tests: getWhiteSpaces(string, length, attributes);
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207489
638-
639 if (!qt_initcharattributes_default_algorithm_only) {
!qt_initcharat...algorithm_onlyDescription
TRUEevaluated 207630 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 8705 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
8705-207630
640 if (!items || numItems <= 0)
!itemsDescription
TRUEnever evaluated
FALSEevaluated 207630 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
numItems <= 0Description
TRUEnever evaluated
FALSEevaluated 207630 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-207630
641 return;
never executed: return;
0
642-
643 QVarLengthArray<HB_ScriptItem, 64> scriptItems;-
644 scriptItems.reserve(numItems);-
645 int start = 0;-
646 HB_Script startScript = script_to_hbscript(items[start].script);-
647 if (Q_UNLIKELY(startScript == HB_Script_Inherited))
__builtin_expe...rited), false)Description
TRUEnever evaluated
FALSEevaluated 207630 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
0-207630
648 startScript = HB_Script_Common;
never executed: startScript = HB_Script_Common;
0
649 for (int i = start + 1; i < numItems; ++i) {
i < numItemsDescription
TRUEevaluated 220606 times by 40 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPushButton
  • ...
FALSEevaluated 207630 times by 114 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207630-220606
650 HB_Script script = script_to_hbscript(items[i].script);-
651 if (Q_LIKELY(script == startScript || script == HB_Script_Inherited))
__builtin_expe...erited), true)Description
TRUEevaluated 220349 times by 39 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPushButton
  • tst_QStackedLayout
  • ...
FALSEevaluated 257 times by 5 tests
Evaluated by:
  • tst_QComplexText
  • tst_QGlyphRun
  • tst_QLineEdit
  • tst_QStaticText
  • tst_QTextEdit
257-220349
652 continue;
executed 220349 times by 39 tests: continue;
Executed by:
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColorDialog
  • tst_QCommandLinkButton
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QMenu
  • tst_QMenuBar
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QPushButton
  • tst_QStackedLayout
  • ...
220349
653 Q_ASSERT(items[i].position > items[start].position);-
654 HB_ScriptItem item;-
655 item.pos = items[start].position;-
656 item.length = items[i].position - items[start].position;-
657 item.script = startScript;-
658 item.bidiLevel = 0; // unused-
659 scriptItems.append(item);-
660 start = i;-
661 startScript = script;-
662 }
executed 257 times by 5 tests: end of block
Executed by:
  • tst_QComplexText
  • tst_QGlyphRun
  • tst_QLineEdit
  • tst_QStaticText
  • tst_QTextEdit
257
663 if (items[start].position + 1 < length) {
items[start].p...n + 1 < lengthDescription
TRUEevaluated 180993 times by 113 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 26637 times by 61 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGroupBox
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • ...
26637-180993
664 HB_ScriptItem item;-
665 item.pos = items[start].position;-
666 item.length = length - items[start].position;-
667 item.script = startScript;-
668 item.bidiLevel = 0; // unused-
669 scriptItems.append(item);-
670 }
executed 180993 times by 113 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
180993
671 Q_STATIC_ASSERT(sizeof(QCharAttributes) == sizeof(HB_CharAttributes));-
672 HB_GetTailoredCharAttributes(string, length,-
673 scriptItems.constData(), scriptItems.size(),-
674 reinterpret_cast<HB_CharAttributes *>(attributes));-
675 }
executed 207630 times by 114 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
207630
676}
executed 216335 times by 114 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
216335
677-
678-
679// -----------------------------------------------------------------------------
680//-
681// The Unicode script property. See http://www.unicode.org/reports/tr24/tr24-24.html-
682//-
683// -----------------------------------------------------------------------------
684-
685Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts)-
686{-
687 int sor = 0;-
688 int eor = 0;-
689 uchar script = QChar::Script_Common;-
690-
691 for (int i = 0; i < length; ++i, eor = i) {
i < lengthDescription
TRUEevaluated 6067506 times by 116 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 257027 times by 116 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
257027-6067506
692 uint ucs4 = string[i];-
693 if (QChar::isHighSurrogate(ucs4) && i + 1 < length) {
QChar::isHighSurrogate(ucs4)Description
TRUEevaluated 921 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 6066585 times by 116 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
i + 1 < lengthDescription
TRUEevaluated 893 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
28-6066585
694 ushort low = string[i + 1];-
695 if (QChar::isLowSurrogate(low)) {
QChar::isLowSurrogate(low)Description
TRUEevaluated 865 times by 2 tests
Evaluated by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
28-865
696 ucs4 = QChar::surrogateToUcs4(ucs4, low);-
697 ++i;-
698 }
executed 865 times by 2 tests: end of block
Executed by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
865
699 }
executed 893 times by 2 tests: end of block
Executed by:
  • tst_QTextBoundaryFinder
  • tst_QTextLayout
893
700-
701 const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ucs4);-
702-
703 uchar nscript = prop->script;-
704-
705 if (Q_LIKELY(nscript == script || nscript <= QChar::Script_Common))
__builtin_expe...Common), true)Description
TRUEevaluated 5966042 times by 116 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 101464 times by 112 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
101464-5966042
706 continue;
executed 5966042 times by 116 tests: continue;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
5966042
707-
708 // inherit preceding Common-s-
709 if (Q_UNLIKELY(script <= QChar::Script_Common)) {
__builtin_expe...ommon), false)Description
TRUEevaluated 100737 times by 112 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
FALSEevaluated 727 times by 7 tests
Evaluated by:
  • tst_QComplexText
  • tst_QGlyphRun
  • tst_QLineEdit
  • tst_QStaticText
  • tst_QTextBoundaryFinder
  • tst_QTextEdit
  • tst_QTextLayout
727-100737
710 // also covers a case where the base character of Common script followed-
711 // by one or more combining marks of non-Inherited, non-Common script-
712 script = nscript;-
713 continue;
executed 100737 times by 112 tests: continue;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • ...
100737
714 }-
715-
716 // Never break between a combining mark (gc= Mc, Mn or Me) and its base character.-
717 // Thus, a combining mark — whatever its script property value is — should inherit-
718 // the script property value of its base character.-
719 static const int test = (FLAG(QChar::Mark_NonSpacing) | FLAG(QChar::Mark_SpacingCombining) | FLAG(QChar::Mark_Enclosing));-
720 if (Q_UNLIKELY(FLAG(prop->category) & test))
__builtin_expe... test), false)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QTextBoundaryFinder
FALSEevaluated 717 times by 7 tests
Evaluated by:
  • tst_QComplexText
  • tst_QGlyphRun
  • tst_QLineEdit
  • tst_QStaticText
  • tst_QTextBoundaryFinder
  • tst_QTextEdit
  • tst_QTextLayout
10-717
721 continue;
executed 10 times by 1 test: continue;
Executed by:
  • tst_QTextBoundaryFinder
10
722-
723 Q_ASSERT(script > QChar::Script_Common);-
724 Q_ASSERT(sor < eor);-
725 ::memset(scripts + sor, script, (eor - sor) * sizeof(uchar));-
726 sor = eor;-
727-
728 script = nscript;-
729 }
executed 717 times by 7 tests: end of block
Executed by:
  • tst_QComplexText
  • tst_QGlyphRun
  • tst_QLineEdit
  • tst_QStaticText
  • tst_QTextBoundaryFinder
  • tst_QTextEdit
  • tst_QTextLayout
717
730-
731 Q_ASSERT(script >= QChar::Script_Common);-
732 Q_ASSERT(eor == length);-
733 ::memset(scripts + sor, script, (eor - sor) * sizeof(uchar));-
734}
executed 257027 times by 116 tests: end of block
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
257027
735-
736} // namespace QUnicodeTools-
737-
738QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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