OpenCoverage

qloggingregistry.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qloggingregistry.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11namespace { namespace Q_QGS_qtLoggingRegistry { typedef QLoggingRegistry Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 1191 times by 429 tests
Evaluated by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • ...
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 1191 times by 429 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • ...
}
executed 1191 times by 429 tests: end of block
Executed by:
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • ...
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 244573 times by 547 tests: return &holder.value;
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
&holder.value;
executed 244573 times by 547 tests: return &holder.value;
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
} } } static QGlobalStatic<QLoggingRegistry, Q_QGS_qtLoggingRegistry::innerFunction, Q_QGS_qtLoggingRegistry::guard> qtLoggingRegistry;
0-244573
12-
13-
14-
15-
16-
17QLoggingRule::QLoggingRule() :-
18 enabled(false)-
19{-
20}
never executed: end of block
0
21-
22-
23-
24-
25-
26QLoggingRule::QLoggingRule(const QStringRef &pattern, bool enabled) :-
27 messageType(-1),-
28 enabled(enabled)-
29{-
30 parse(pattern);-
31}
executed 24116 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24116
32-
33-
34-
35-
36-
37-
38int QLoggingRule::pass(const QString &cat, QtMsgType msgType) const-
39{-
40-
41 if (messageType > -1
messageType > -1Description
TRUEevaluated 516 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 865359 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
&& messageType != msgType
messageType != msgTypeDescription
TRUEevaluated 384 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 132 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
132-865359
42 return
executed 384 times by 2 tests: return 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
0;
executed 384 times by 2 tests: return 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
384
43-
44 if (flags == FullText
flags == FullTextDescription
TRUEevaluated 1050 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 864441 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
1050-864441
45-
46 if (category == cat
category == catDescription
TRUEevaluated 127 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 923 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
127-923
47 return
executed 127 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
(enabled ? 1 : -1);
executed 127 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
127
48 else-
49 return
executed 923 times by 2 tests: return 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
0;
executed 923 times by 2 tests: return 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
923
50 }-
51-
52 const int idx = cat.indexOf(category);-
53 if (idx >= 0
idx >= 0Description
TRUEevaluated 288174 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 576267 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
288174-576267
54 if (flags == MidFilter
flags == MidFilterDescription
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 288099 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
75-288099
55-
56 if (idx >= 0
idx >= 0Description
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEnever evaluated
)
0-75
57 return
executed 75 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
(enabled ? 1 : -1);
executed 75 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
75
58 }
never executed: end of block
else if (flags == LeftFilter
flags == LeftFilterDescription
TRUEevaluated 288081 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
0-288081
59-
60 if (idx == 0
idx == 0Description
TRUEevaluated 288081 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEnever evaluated
)
0-288081
61 return
executed 288081 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
(enabled ? 1 : -1);
executed 288081 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
288081
62 }
never executed: end of block
else if (flags == RightFilter
flags == RightFilterDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEnever evaluated
) {
0-18
63-
64 if (idx == (cat.count() - category.count())
idx == (cat.co...egory.count())Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
)
2-16
65 return
executed 16 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
(enabled ? 1 : -1);
executed 16 times by 2 tests: return (enabled ? 1 : -1);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
16
66 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QLoggingRegistry
2
67 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QLoggingRegistry
2
68 return
executed 576269 times by 2 tests: return 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
0;
executed 576269 times by 2 tests: return 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
576269
69}-
70void QLoggingRule::parse(const QStringRef &pattern)-
71{-
72 QStringRef p;-
73-
74-
75 if (pattern.endsWith(QLatin1String(".debug"))
pattern.endsWi...ing(".debug"))Description
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 24102 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
14-24102
76 p = QStringRef(pattern.string(), pattern.position(),-
77 pattern.length() - 6);-
78 messageType = QtDebugMsg;-
79 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
else if (pattern.endsWith(QLatin1String(".info"))
pattern.endsWi...ring(".info"))Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 24098 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
4-24098
80 p = QStringRef(pattern.string(), pattern.position(),-
81 pattern.length() - 5);-
82 messageType = QtInfoMsg;-
83 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QLogging
else if (pattern.endsWith(QLatin1String(".warning"))
pattern.endsWi...g(".warning"))Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 24089 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
4-24089
84 p = QStringRef(pattern.string(), pattern.position(),-
85 pattern.length() - 8);-
86 messageType = QtWarningMsg;-
87 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
else if (pattern.endsWith(QLatin1String(".critical"))
pattern.endsWi...(".critical"))Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 24085 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
4-24085
88 p = QStringRef(pattern.string(), pattern.position(),-
89 pattern.length() - 9);-
90 messageType = QtCriticalMsg;-
91 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
else {
4
92 p = pattern;-
93 }
executed 24085 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24085
94-
95 if (!p.contains(QLatin1Char('*'))
!p.contains(QLatin1Char('*'))Description
TRUEevaluated 63 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 24053 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
63-24053
96 flags = FullText;-
97 }
executed 63 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
else {
63
98 if (p.endsWith(QLatin1Char('*'))
p.endsWith(QLatin1Char('*'))Description
TRUEevaluated 24040 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
13-24040
99 flags |= LeftFilter;-
100 p = QStringRef(p.string(), p.position(), p.length() - 1);-
101 }
executed 24040 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24040
102 if (p.startsWith(QLatin1Char('*'))
p.startsWith(QLatin1Char('*'))Description
TRUEevaluated 25 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 23966 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
25-23966
103 flags |= RightFilter;-
104 p = QStringRef(p.string(), p.position() + 1, p.length() - 1);-
105 }
executed 25 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
25
106 if (p.contains(QLatin1Char('*'))
p.contains(QLatin1Char('*'))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 24050 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
3-24050
107 flags = 0;
executed 3 times by 1 test: flags = 0;
Executed by:
  • tst_QLoggingRegistry
3
108 }
executed 24053 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24053
109-
110 category = p.toString();-
111}
executed 24116 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24116
112void QLoggingSettingsParser::setContent(const QString &content)-
113{-
114 QString content_ = content;-
115 QTextStream stream(&content_, QIODevice::ReadOnly);-
116 setContent(stream);-
117}
executed 24025 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24025
118-
119-
120-
121-
122-
123void QLoggingSettingsParser::setContent(QTextStream &stream)-
124{-
125 _rules.clear();-
126 while (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 24089 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 24031 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
) {
24031-24089
127 QString line = stream.readLine();-
128-
129-
130 line = line.simplified();-
131 line.remove(QLatin1Char(' '));-
132-
133-
134 if (line.startsWith(QLatin1Char(';'))
line.startsWit...tin1Char(';'))Description
TRUEnever evaluated
FALSEevaluated 24089 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
0-24089
135 continue;
never executed: continue;
0
136-
137 if (line.startsWith(QLatin1Char('['))
line.startsWit...tin1Char('['))Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 24080 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
&& line.endsWith(QLatin1Char(']'))
line.endsWith(...tin1Char(']'))Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEnever evaluated
) {
0-24080
138-
139 _section = line.mid(1, line.size() - 2);-
140 continue;
executed 9 times by 1 test: continue;
Executed by:
  • tst_QLoggingRegistry
9
141 }-
142-
143 if (_section.toLower() == QLatin1String("rules")
_section.toLow...tring("rules")Description
TRUEevaluated 24079 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QLoggingRegistry
) {
1-24079
144 int equalPos = line.indexOf(QLatin1Char('='));-
145 if (equalPos != -1
equalPos != -1Description
TRUEevaluated 24079 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEnever evaluated
) {
0-24079
146 if (line.lastIndexOf(QLatin1Char('=')) == equalPos
line.lastIndex...)) == equalPosDescription
TRUEevaluated 24079 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEnever evaluated
) {
0-24079
147 const QStringRef pattern = line.leftRef(equalPos);-
148 const QStringRef valueStr = line.midRef(equalPos + 1);-
149 int value = -1;-
150 if (valueStr == QLatin1String("true")
valueStr == QL...String("true")Description
TRUEevaluated 12029 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 12050 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
12029-12050
151 value = 1;
executed 12029 times by 2 tests: value = 1;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
12029
152 else if (valueStr == QLatin1String("false")
valueStr == QL...tring("false")Description
TRUEevaluated 12041 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
9-12041
153 value = 0;
executed 12041 times by 2 tests: value = 0;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
12041
154 QLoggingRule rule(pattern, (value == 1));-
155 if (rule.flags != 0
rule.flags != 0Description
TRUEevaluated 24078 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QLoggingRegistry
&& (
(value != -1)Description
TRUEevaluated 24069 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
value != -1)
(value != -1)Description
TRUEevaluated 24069 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
1-24078
156 _rules.append(rule);
executed 24069 times by 2 tests: _rules.append(rule);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24069
157 else-
158 QMessageLogger(__FILE__, 233, __FUNCTION__, "qt.core.logging").warning("Ignoring malformed logging rule: '%s'", line.toUtf8().constData());
executed 10 times by 2 tests: QMessageLogger(__FILE__, 233, __FUNCTION__, "qt.core.logging").warning("Ignoring malformed logging rule: '%s'", line.toUtf8().constData());
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
10
159 } else {-
160 QMessageLogger(__FILE__, 235, __FUNCTION__, "qt.core.logging").warning("Ignoring malformed logging rule: '%s'", line.toUtf8().constData());-
161 }
never executed: end of block
0
162 }-
163 }
executed 24079 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24079
164 }
executed 24080 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24080
165}
executed 24031 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24031
166-
167-
168-
169-
170-
171QLoggingRegistry::QLoggingRegistry()-
172 : categoryFilter(defaultCategoryFilter)-
173{-
174}
executed 885 times by 34 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDate
  • tst_QDateTime
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QPainterPath
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSql
  • tst_QString
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • ...
885
175-
176static bool qtLoggingDebug()-
177{-
178 static const bool debugEnv = qEnvironmentVariableIsSet("QT_LOGGING_DEBUG");-
179 return
executed 24023 times by 2 tests: return debugEnv;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
debugEnv;
executed 24023 times by 2 tests: return debugEnv;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24023
180}-
181-
182static QVector<QLoggingRule> loadRulesFromFile(const QString &filePath)-
183{-
184 QFile file(filePath);-
185 if (file.open(QIODevice::ReadOnly | QIODevice::Text)
file.open(QIOD...ODevice::Text)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 1080 times by 24 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
) {
4-1080
186 if (qtLoggingDebug()
qtLoggingDebug()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
)
0-4
187 QMessageLogger(__FILE__, 262, __FUNCTION__, "qt.core.logging").debug("Loading \"%s\" ...",
never executed: QMessageLogger(__FILE__, 262, __FUNCTION__, "qt.core.logging").debug("Loading \"%s\" ...", QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
0
188 QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
never executed: QMessageLogger(__FILE__, 262, __FUNCTION__, "qt.core.logging").debug("Loading \"%s\" ...", QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
0
189 QTextStream stream(&file);-
190 QLoggingSettingsParser parser;-
191 parser.setContent(stream);-
192 return
executed 4 times by 1 test: return parser.rules();
Executed by:
  • tst_QLoggingRegistry
parser.rules();
executed 4 times by 1 test: return parser.rules();
Executed by:
  • tst_QLoggingRegistry
4
193 }-
194 return
executed 1080 times by 24 tests: return QVector<QLoggingRule>();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
QVector<QLoggingRule>();
executed 1080 times by 24 tests: return QVector<QLoggingRule>();
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1080
195}-
196-
197-
198-
199-
200-
201-
202void QLoggingRegistry::init()-
203{-
204-
205 const QByteArray rulesFilePath = qgetenv("QT_LOGGING_CONF");-
206 if (!rulesFilePath.isEmpty()
!rulesFilePath.isEmpty()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 1078 times by 23 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
)
3-1078
207 envRules = loadRulesFromFile(QFile::decodeName(rulesFilePath));
executed 3 times by 1 test: envRules = loadRulesFromFile(QFile::decodeName(rulesFilePath));
Executed by:
  • tst_QLoggingRegistry
3
208-
209 const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES").replace(';', '\n');-
210 if (!rulesSrc.isEmpty()
!rulesSrc.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 1079 times by 24 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
) {
2-1079
211 QTextStream stream(rulesSrc);-
212 QLoggingSettingsParser parser;-
213 parser.setSection(([]() -> QString { enum { Size = sizeof(u"" "Rules")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Rules" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 2 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QLoggingRegistry
qstring_literal_temp;
executed 2 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QLoggingRegistry
}()));
2
214 parser.setContent(stream);-
215 envRules += parser.rules();-
216 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QLoggingRegistry
2
217-
218 const QString configFileName = ([]() -> QString { enum { Size = sizeof(u"" "qtlogging.ini")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qtlogging.ini" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 1081 times by 24 tests: return qstring_literal_temp;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
qstring_literal_temp;
executed 1081 times by 24 tests: return qstring_literal_temp;
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
}());
1081
219-
220-
221-
222 const QString qtConfigPath-
223 = QDir(QLibraryInfo::location(QLibraryInfo::DataPath)).absoluteFilePath(configFileName);-
224 qtConfigRules = loadRulesFromFile(qtConfigPath);-
225-
226-
227-
228 const QString envPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation,-
229 QString::fromLatin1("QtProject/") + configFileName);-
230 if (!envPath.isEmpty()
!envPath.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 1079 times by 24 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
)
1-1079
231 configRules = loadRulesFromFile(envPath);
executed 1 time by 1 test: configRules = loadRulesFromFile(envPath);
Executed by:
  • tst_QLoggingRegistry
1
232-
233 if (!envRules.isEmpty()
!envRules.isEmpty()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QLoggingRegistry
FALSEevaluated 1077 times by 23 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
|| !qtConfigRules.isEmpty()
!qtConfigRules.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 1077 times by 23 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
|| !configRules.isEmpty()
!configRules.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 1077 times by 23 tests
Evaluated by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
) {
0-1077
234 QMutexLocker locker(&registryMutex);-
235 updateRules();-
236 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QLoggingRegistry
3
237}
executed 1080 times by 24 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QDBusConnectionNoBus
  • tst_QDBusConnectionNoLibDBus1
  • tst_QDBusConnection_Delayed
  • tst_QDnsLookup_Appless
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QLoggingRegistry
  • tst_QNetworkConfigurationManager
  • tst_QSql
  • tst_qapplication - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qlogging - unknown status
  • tst_qobject - unknown status
  • tst_qprocess - unknown status
  • tst_qsharedmemory - unknown status
  • tst_qsystemsemaphore - unknown status
  • tst_selftests - unknown status
1080
238-
239-
240-
241-
242-
243-
244-
245void QLoggingRegistry::registerCategory(QLoggingCategory *cat, QtMsgType enableForLevel)-
246{-
247 QMutexLocker locker(&registryMutex);-
248-
249 if (!categories.contains(cat)
!categories.contains(cat)Description
TRUEevaluated 918 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
FALSEnever evaluated
) {
0-918
250 categories.insert(cat, enableForLevel);-
251 (*categoryFilter)(cat);-
252 }
executed 918 times by 243 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
918
253}
executed 918 times by 243 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
918
254-
255-
256-
257-
258-
259void QLoggingRegistry::unregisterCategory(QLoggingCategory *cat)-
260{-
261 QMutexLocker locker(&registryMutex);-
262 categories.remove(cat);-
263}
executed 1485 times by 306 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
  • tst_QNoDebug
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • tst_qactiongroup - unknown status
  • tst_qanimationgroup - unknown status
  • tst_qapplication - unknown status
  • ...
1485
264-
265-
266-
267-
268-
269void QLoggingRegistry::setApiRules(const QString &content)-
270{-
271 QLoggingSettingsParser parser;-
272 parser.setSection(([]() -> QString { enum { Size = sizeof(u"" "Rules")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Rules" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 24019 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
qstring_literal_temp;
executed 24019 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
}()));
24019
273 parser.setContent(content);-
274-
275 QMutexLocker locker(&registryMutex);-
276-
277 if (qtLoggingDebug()
qtLoggingDebug()Description
TRUEnever evaluated
FALSEevaluated 24019 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
)
0-24019
278 QMessageLogger(__FILE__, 353, __FUNCTION__, "qt.core.logging").debug("Loading logging rules set by QLoggingCategory::setFilterRules ...");
never executed: QMessageLogger(__FILE__, 353, __FUNCTION__, "qt.core.logging").debug("Loading logging rules set by QLoggingCategory::setFilterRules ...");
0
279-
280 apiRules = parser.rules();-
281-
282 updateRules();-
283}
executed 24019 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24019
284-
285-
286-
287-
288-
289-
290-
291void QLoggingRegistry::updateRules()-
292{-
293 rules = qtConfigRules + configRules + apiRules + envRules;-
294-
295 for (auto it = categories.keyBegin(), end = categories.keyEnd(); it != end
it != endDescription
TRUEevaluated 216136 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 24025 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
; ++it)
24025-216136
296 (*
executed 216136 times by 2 tests: (*categoryFilter)(*it);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
categoryFilter)(*it);
executed 216136 times by 2 tests: (*categoryFilter)(*it);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
216136
297}
executed 24025 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
24025
298-
299-
300-
301-
302-
303QLoggingCategory::CategoryFilter-
304QLoggingRegistry::installFilter(QLoggingCategory::CategoryFilter filter)-
305{-
306 QMutexLocker locker(&registryMutex);-
307-
308 if (filter == 0
filter == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QLogging
)
3-4
309 filter = defaultCategoryFilter;
executed 3 times by 1 test: filter = defaultCategoryFilter;
Executed by:
  • tst_QLogging
3
310-
311 QLoggingCategory::CategoryFilter old = categoryFilter;-
312 categoryFilter = filter;-
313-
314 for (auto it = categories.keyBegin(), end = categories.keyEnd(); it != end
it != endDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QLogging
; ++it)
7-22
315 (*
executed 22 times by 1 test: (*categoryFilter)(*it);
Executed by:
  • tst_QLogging
categoryFilter)(*it);
executed 22 times by 1 test: (*categoryFilter)(*it);
Executed by:
  • tst_QLogging
22
316-
317 return
executed 7 times by 1 test: return old;
Executed by:
  • tst_QLogging
old;
executed 7 times by 1 test: return old;
Executed by:
  • tst_QLogging
7
318}-
319-
320QLoggingRegistry *QLoggingRegistry::instance()-
321{-
322 return
executed 244573 times by 547 tests: return qtLoggingRegistry();
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
qtLoggingRegistry();
executed 244573 times by 547 tests: return qtLoggingRegistry();
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
244573
323}-
324-
325-
326-
327-
328-
329void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)-
330{-
331 const QLoggingRegistry *reg = QLoggingRegistry::instance();-
332 ((!(reg->categories.contains(cat))) ? qt_assert("reg->categories.contains(cat)",__FILE__,407) : qt_noop());-
333 QtMsgType enableForLevel = reg->categories.value(cat);-
334-
335-
336-
337 bool debug = (enableForLevel == QtDebugMsg);-
338 bool info = debug
debugDescription
TRUEevaluated 169024 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
FALSEevaluated 48041 times by 1 test
Evaluated by:
  • tst_QLogging
|| (
(enableForLevel == QtInfoMsg)Description
TRUEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 24021 times by 1 test
Evaluated by:
  • tst_QLogging
enableForLevel == QtInfoMsg)
(enableForLevel == QtInfoMsg)Description
TRUEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 24021 times by 1 test
Evaluated by:
  • tst_QLogging
;
24020-169024
339 bool warning = info
infoDescription
TRUEevaluated 193044 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
FALSEevaluated 24021 times by 1 test
Evaluated by:
  • tst_QLogging
|| (
(enableForLeve... QtWarningMsg)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
enableForLevel == QtWarningMsg)
(enableForLeve... QtWarningMsg)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QLogging
FALSEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
;
1-193044
340 bool critical = warning
warningDescription
TRUEevaluated 193045 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
FALSEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
|| (
(enableForLeve...QtCriticalMsg)Description
TRUEnever evaluated
FALSEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
enableForLevel == QtCriticalMsg)
(enableForLeve...QtCriticalMsg)Description
TRUEnever evaluated
FALSEevaluated 24020 times by 1 test
Evaluated by:
  • tst_QLogging
;
0-193045
341-
342-
343-
344-
345 if (const
const char *ca...categoryName()Description
TRUEevaluated 217065 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
FALSEnever evaluated
char *categoryName = cat->categoryName()
const char *ca...categoryName()Description
TRUEevaluated 217065 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
FALSEnever evaluated
) {
0-217065
346-
347 if (strcmp(categoryName, "qt") == 0
strcmp(categor...me, "qt") == 0Description
TRUEnever evaluated
FALSEevaluated 217065 times by 243 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
|| strncmp(categoryName, "qt.", 3) == 0
strncmp(catego..."qt.", 3) == 0Description
TRUEevaluated 379 times by 137 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
FALSEevaluated 216686 times by 160 tests
Evaluated by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QByteArray
  • tst_QColor
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QDBusInterface
  • tst_QDBusLocalCalls
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • ...
)
0-217065
348 debug = false;
executed 379 times by 137 tests: debug = false;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • ...
379
349 }
executed 217065 times by 243 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
217065
350-
351 QString categoryName = QLatin1String(cat->categoryName());-
352 for (const QLoggingRule &item : reg->rules) {-
353 int filterpass = item.pass(categoryName, QtDebugMsg);-
354 if (filterpass != 0
filterpass != 0Description
TRUEevaluated 72079 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 144381 times by 1 test
Evaluated by:
  • tst_QLogging
)
72079-144381
355 debug = (filterpass > 0);
executed 72079 times by 2 tests: debug = (filterpass > 0);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
72079
356 filterpass = item.pass(categoryName, QtInfoMsg);-
357 if (filterpass != 0
filterpass != 0Description
TRUEevaluated 72067 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 144393 times by 1 test
Evaluated by:
  • tst_QLogging
)
72067-144393
358 info = (filterpass > 0);
executed 72067 times by 2 tests: info = (filterpass > 0);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
72067
359 filterpass = item.pass(categoryName, QtWarningMsg);-
360 if (filterpass != 0
filterpass != 0Description
TRUEevaluated 72067 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 144393 times by 1 test
Evaluated by:
  • tst_QLogging
)
72067-144393
361 warning = (filterpass > 0);
executed 72067 times by 2 tests: warning = (filterpass > 0);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
72067
362 filterpass = item.pass(categoryName, QtCriticalMsg);-
363 if (filterpass != 0
filterpass != 0Description
TRUEevaluated 72066 times by 2 tests
Evaluated by:
  • tst_QLogging
  • tst_QLoggingRegistry
FALSEevaluated 144394 times by 1 test
Evaluated by:
  • tst_QLogging
)
72066-144394
364 critical = (filterpass > 0);
executed 72066 times by 2 tests: critical = (filterpass > 0);
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
72066
365 }
executed 216460 times by 2 tests: end of block
Executed by:
  • tst_QLogging
  • tst_QLoggingRegistry
216460
366-
367 cat->setEnabled(QtDebugMsg, debug);-
368 cat->setEnabled(QtInfoMsg, info);-
369 cat->setEnabled(QtWarningMsg, warning);-
370 cat->setEnabled(QtCriticalMsg, critical);-
371}
executed 217065 times by 243 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QCalendarWidget
  • ...
217065
372-
373-
374-
Switch to Source codePreprocessed file

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