qdbusutil.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusutil.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 QtDBus 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 "qdbusutil_p.h"-
41-
42#include "qdbus_symbols_p.h"-
43-
44#include <QtCore/qstringlist.h>-
45#include <QtCore/qvector.h>-
46-
47#include "qdbusargument.h"-
48#include "qdbusunixfiledescriptor.h"-
49-
50#ifndef QT_NO_DBUS-
51-
52QT_BEGIN_NAMESPACE-
53-
54static inline bool isValidCharacterNoDash(QChar c)-
55{-
56 ushort u = c.unicode();-
57 return (u >= 'a' && u <= 'z')
executed 181761 times by 181 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
181761
58 || (u >= 'A' && u <= 'Z')
executed 181761 times by 181 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
181761
59 || (u >= '0' && u <= '9')
executed 181761 times by 181 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
181761
60 || (u == '_');
executed 181761 times by 181 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
181761
61}-
62-
63static inline bool isValidCharacter(QChar c)-
64{-
65 ushort u = c.unicode();-
66 return (u >= 'a' && u <= 'z')
executed 47895 times by 160 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_') || (u == '-');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
47895
67 || (u >= 'A' && u <= 'Z')
executed 47895 times by 160 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_') || (u == '-');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
47895
68 || (u >= '0' && u <= '9')
executed 47895 times by 160 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_') || (u == '-');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
47895
69 || (u == '_') || (u == '-');
executed 47895 times by 160 tests: return (u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || (u == '_') || (u == '-');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
47895
70}-
71-
72static inline bool isValidNumber(QChar c)-
73{-
74 ushort u = c.unicode();-
75 return (u >= '0' && u <= '9');
executed 22951 times by 181 tests: return (u >= '0' && u <= '9');
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
22951
76}-
77-
78#ifndef QT_BOOTSTRAPPED-
79static bool argToString(const QDBusArgument &arg, QString &out);-
80-
81static bool variantToString(const QVariant &arg, QString &out)-
82{-
83 int argType = arg.userType();-
84-
85 if (argType == QVariant::StringList) {
argType == QVa...nt::StringListDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 599 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
9-599
86 out += QLatin1Char('{');-
87 const QStringList list = arg.toStringList();-
88 for (const QString &item : list)-
89 out += QLatin1Char('\"') + item + QLatin1String("\", ");
executed 14 times by 1 test: out += QLatin1Char('\"') + item + QLatin1String("\", ");
Executed by:
  • tst_qdbusmarshall - unknown status
14
90 if (!list.isEmpty())
!list.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
3-6
91 out.chop(2);
executed 6 times by 1 test: out.chop(2);
Executed by:
  • tst_qdbusmarshall - unknown status
6
92 out += QLatin1Char('}');-
93 } else if (argType == QVariant::ByteArray) {
executed 9 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == QVariant::ByteArrayDescription
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 582 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
9-582
94 out += QLatin1Char('{');-
95 QByteArray list = arg.toByteArray();-
96 for (int i = 0; i < list.count(); ++i) {
i < list.count()Description
TRUEevaluated 49 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 17 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
17-49
97 out += QString::number(list.at(i));-
98 out += QLatin1String(", ");-
99 }
executed 49 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
49
100 if (!list.isEmpty())
!list.isEmpty()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
6-11
101 out.chop(2);
executed 11 times by 1 test: out.chop(2);
Executed by:
  • tst_qdbusmarshall - unknown status
11
102 out += QLatin1Char('}');-
103 } else if (argType == QVariant::List) {
executed 17 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == QVariant::ListDescription
TRUEnever evaluated
FALSEevaluated 582 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-582
104 out += QLatin1Char('{');-
105 const QList<QVariant> list = arg.toList();-
106 for (const QVariant &item : list) {-
107 if (!variantToString(item, out))
!variantToString(item, out)Description
TRUEnever evaluated
FALSEnever evaluated
0
108 return false;
never executed: return false;
0
109 out += QLatin1String(", ");-
110 }
never executed: end of block
0
111 if (!list.isEmpty())
!list.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
112 out.chop(2);
never executed: out.chop(2);
0
113 out += QLatin1Char('}');-
114 } else if (argType == QMetaType::Char || argType == QMetaType::Short || argType == QMetaType::Int
never executed: end of block
argType == QMetaType::CharDescription
TRUEnever evaluated
FALSEevaluated 582 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::ShortDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 562 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::IntDescription
TRUEevaluated 179 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 383 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-582
115 || argType == QMetaType::Long || argType == QMetaType::LongLong) {
argType == QMetaType::LongDescription
TRUEnever evaluated
FALSEevaluated 383 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::LongLongDescription
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 366 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-383
116 out += QString::number(arg.toLongLong());-
117 } else if (argType == QMetaType::UChar || argType == QMetaType::UShort || argType == QMetaType::UInt
executed 216 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::UCharDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 365 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::UShortDescription
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 354 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::UIntDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 338 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
1-365
118 || argType == QMetaType::ULong || argType == QMetaType::ULongLong) {
argType == QMetaType::ULongDescription
TRUEnever evaluated
FALSEevaluated 338 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
argType == QMe...ype::ULongLongDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 329 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-338
119 out += QString::number(arg.toULongLong());-
120 } else if (argType == QMetaType::Double) {
executed 37 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::DoubleDescription
TRUEevaluated 29 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 300 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
29-300
121 out += QString::number(arg.toDouble());-
122 } else if (argType == QMetaType::Bool) {
executed 29 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == QMetaType::BoolDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 290 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-290
123 out += QLatin1String(arg.toBool() ? "true" : "false");-
124 } else if (argType == qMetaTypeId<QDBusArgument>()) {
executed 10 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == qMe...BusArgument>()Description
TRUEevaluated 105 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 185 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-185
125 argToString(qvariant_cast<QDBusArgument>(arg), out);-
126 } else if (argType == qMetaTypeId<QDBusObjectPath>()) {
executed 105 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == qMe...sObjectPath>()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 175 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-175
127 const QString path = qvariant_cast<QDBusObjectPath>(arg).path();-
128 out += QLatin1String("[ObjectPath: ");-
129 out += path;-
130 out += QLatin1Char(']');-
131 } else if (argType == qMetaTypeId<QDBusSignature>()) {
executed 10 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == qMe...usSignature>()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 164 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-164
132 out += QLatin1String("[Signature: ") + qvariant_cast<QDBusSignature>(arg).signature();-
133 out += QLatin1Char(']');-
134 } else if (argType == qMetaTypeId<QDBusUnixFileDescriptor>()) {
executed 11 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == qMe...eDescriptor>()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
6-158
135 out += QLatin1String("[Unix FD: ");-
136 out += QLatin1String(qvariant_cast<QDBusUnixFileDescriptor>(arg).isValid() ? "valid" : "not valid");-
137 out += QLatin1Char(']');-
138 } else if (argType == qMetaTypeId<QDBusVariant>()) {
executed 6 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
argType == qMe...DBusVariant>()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
6-94
139 const QVariant v = qvariant_cast<QDBusVariant>(arg).variant();-
140 out += QLatin1String("[Variant");-
141 int vUserType = v.userType();-
142 if (vUserType != qMetaTypeId<QDBusVariant>()
vUserType != q...DBusVariant>()Description
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
4-60
143 && vUserType != qMetaTypeId<QDBusSignature>()
vUserType != q...usSignature>()Description
TRUEevaluated 59 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
1-59
144 && vUserType != qMetaTypeId<QDBusObjectPath>()
vUserType != q...sObjectPath>()Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
1-58
145 && vUserType != qMetaTypeId<QDBusArgument>())
vUserType != q...BusArgument>()Description
TRUEevaluated 45 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
13-45
146 out += QLatin1Char('(') + QLatin1String(v.typeName()) + QLatin1Char(')');
executed 45 times by 1 test: out += QLatin1Char('(') + QLatin1String(v.typeName()) + QLatin1Char(')');
Executed by:
  • tst_qdbusmarshall - unknown status
45
147 out += QLatin1String(": ");-
148 if (!variantToString(v, out))
!variantToString(v, out)Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-64
149 return false;
never executed: return false;
0
150 out += QLatin1Char(']');-
151 } else if (arg.canConvert(QVariant::String)) {
executed 64 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
arg.canConvert...riant::String)Description
TRUEevaluated 94 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEnever evaluated
0-94
152 out += QLatin1Char('\"') + arg.toString() + QLatin1Char('\"');-
153 } else {
executed 94 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
94
154 out += QLatin1Char('[');-
155 out += QLatin1String(arg.typeName());-
156 out += QLatin1Char(']');-
157 }
never executed: end of block
0
158-
159 return true;
executed 608 times by 1 test: return true;
Executed by:
  • tst_qdbusmarshall - unknown status
608
160}-
161-
162bool argToString(const QDBusArgument &busArg, QString &out)-
163{-
164 QString busSig = busArg.currentSignature();-
165 bool doIterate = false;-
166 QDBusArgument::ElementType elementType = busArg.currentType();-
167-
168 if (elementType != QDBusArgument::BasicType && elementType != QDBusArgument::VariantType
elementType !=...ent::BasicTypeDescription
TRUEevaluated 341 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 290 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
elementType !=...t::VariantTypeDescription
TRUEevaluated 281 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
60-341
169 && elementType != QDBusArgument::MapEntryType)
elementType !=...::MapEntryTypeDescription
TRUEevaluated 202 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
79-202
170 out += QLatin1String("[Argument: ") + busSig + QLatin1Char(' ');
executed 202 times by 1 test: out += QLatin1String("[Argument: ") + busSig + QLatin1Char(' ');
Executed by:
  • tst_qdbusmarshall - unknown status
202
171-
172 switch (elementType) {-
173 case QDBusArgument::BasicType:
executed 290 times by 1 test: case QDBusArgument::BasicType:
Executed by:
  • tst_qdbusmarshall - unknown status
290
174 case QDBusArgument::VariantType:
executed 60 times by 1 test: case QDBusArgument::VariantType:
Executed by:
  • tst_qdbusmarshall - unknown status
60
175 if (!variantToString(busArg.asVariant(), out))
!variantToStri...ariant(), out)Description
TRUEnever evaluated
FALSEevaluated 350 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-350
176 return false;
never executed: return false;
0
177 break;
executed 350 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
350
178 case QDBusArgument::StructureType:
executed 68 times by 1 test: case QDBusArgument::StructureType:
Executed by:
  • tst_qdbusmarshall - unknown status
68
179 busArg.beginStructure();-
180 doIterate = true;-
181 break;
executed 68 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
68
182 case QDBusArgument::ArrayType:
executed 108 times by 1 test: case QDBusArgument::ArrayType:
Executed by:
  • tst_qdbusmarshall - unknown status
108
183 busArg.beginArray();-
184 out += QLatin1Char('{');-
185 doIterate = true;-
186 break;
executed 108 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
108
187 case QDBusArgument::MapType:
executed 26 times by 1 test: case QDBusArgument::MapType:
Executed by:
  • tst_qdbusmarshall - unknown status
26
188 busArg.beginMap();-
189 out += QLatin1Char('{');-
190 doIterate = true;-
191 break;
executed 26 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
26
192 case QDBusArgument::MapEntryType:
executed 79 times by 1 test: case QDBusArgument::MapEntryType:
Executed by:
  • tst_qdbusmarshall - unknown status
79
193 busArg.beginMapEntry();-
194 if (!variantToString(busArg.asVariant(), out))
!variantToStri...ariant(), out)Description
TRUEnever evaluated
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-79
195 return false;
never executed: return false;
0
196 out += QLatin1String(" = ");-
197 if (!argToString(busArg, out))
!argToString(busArg, out)Description
TRUEnever evaluated
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-79
198 return false;
never executed: return false;
0
199 busArg.endMapEntry();-
200 break;
executed 79 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
79
201 case QDBusArgument::UnknownType:
never executed: case QDBusArgument::UnknownType:
0
202 default:
never executed: default:
0
203 out += QLatin1String("<ERROR - Unknown Type>");-
204 return false;
never executed: return false;
0
205 }-
206 if (doIterate && !busArg.atEnd()) {
doIterateDescription
TRUEevaluated 202 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 429 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
!busArg.atEnd()Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
58-429
207 while (!busArg.atEnd()) {
!busArg.atEnd()Description
TRUEevaluated 447 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 144 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
144-447
208 if (!argToString(busArg, out))
!argToString(busArg, out)Description
TRUEnever evaluated
FALSEevaluated 447 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
0-447
209 return false;
never executed: return false;
0
210 out += QLatin1String(", ");-
211 }
executed 447 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
447
212 out.chop(2);-
213 }
executed 144 times by 1 test: end of block
Executed by:
  • tst_qdbusmarshall - unknown status
144
214 switch (elementType) {-
215 case QDBusArgument::BasicType:
executed 290 times by 1 test: case QDBusArgument::BasicType:
Executed by:
  • tst_qdbusmarshall - unknown status
290
216 case QDBusArgument::VariantType:
executed 60 times by 1 test: case QDBusArgument::VariantType:
Executed by:
  • tst_qdbusmarshall - unknown status
60
217 case QDBusArgument::UnknownType:
never executed: case QDBusArgument::UnknownType:
0
218 case QDBusArgument::MapEntryType:
executed 79 times by 1 test: case QDBusArgument::MapEntryType:
Executed by:
  • tst_qdbusmarshall - unknown status
79
219 // nothing to do-
220 break;
executed 429 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
429
221 case QDBusArgument::StructureType:
executed 68 times by 1 test: case QDBusArgument::StructureType:
Executed by:
  • tst_qdbusmarshall - unknown status
68
222 busArg.endStructure();-
223 break;
executed 68 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
68
224 case QDBusArgument::ArrayType:
executed 108 times by 1 test: case QDBusArgument::ArrayType:
Executed by:
  • tst_qdbusmarshall - unknown status
108
225 out += QLatin1Char('}');-
226 busArg.endArray();-
227 break;
executed 108 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
108
228 case QDBusArgument::MapType:
executed 26 times by 1 test: case QDBusArgument::MapType:
Executed by:
  • tst_qdbusmarshall - unknown status
26
229 out += QLatin1Char('}');-
230 busArg.endMap();-
231 break;
executed 26 times by 1 test: break;
Executed by:
  • tst_qdbusmarshall - unknown status
26
232 }-
233-
234 if (elementType != QDBusArgument::BasicType && elementType != QDBusArgument::VariantType
elementType !=...ent::BasicTypeDescription
TRUEevaluated 341 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 290 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
elementType !=...t::VariantTypeDescription
TRUEevaluated 281 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
60-341
235 && elementType != QDBusArgument::MapEntryType)
elementType !=...::MapEntryTypeDescription
TRUEevaluated 202 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
79-202
236 out += QLatin1Char(']');
executed 202 times by 1 test: out += QLatin1Char(']');
Executed by:
  • tst_qdbusmarshall - unknown status
202
237-
238 return true;
executed 631 times by 1 test: return true;
Executed by:
  • tst_qdbusmarshall - unknown status
631
239}-
240#endif-
241-
242//------- D-Bus Types ---------
243static const char oneLetterTypes[] = "vsogybnqiuxtdh";-
244static const char basicTypes[] = "sogybnqiuxtdh";-
245static const char fixedTypes[] = "ybnqiuxtdh";-
246-
247static bool isBasicType(int c)-
248{-
249 return c != DBUS_TYPE_INVALID && strchr(basicTypes, c) != NULL;
executed 2506 times by 33 tests: return c != ((int) '\0') && strchr(basicTypes, c) != __null;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
2506
250}-
251-
252static bool isFixedType(int c)-
253{-
254 return c != DBUS_TYPE_INVALID && strchr(fixedTypes, c) != NULL;
executed 216 times by 3 tests: return c != ((int) '\0') && strchr(fixedTypes, c) != __null;
Executed by:
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbustype - unknown status
216
255}-
256-
257// Returns a pointer to one-past-end of this type if it's valid;-
258// returns NULL if it isn't valid.-
259static const char *validateSingleType(const char *signature)-
260{-
261 char c = *signature;-
262 if (c == DBUS_TYPE_INVALID)
c == ((int) '\0')Description
TRUEevaluated 32 times by 3 tests
Evaluated by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbustype - unknown status
FALSEevaluated 9526 times by 35 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
32-9526
263 return 0;
executed 32 times by 3 tests: return 0;
Executed by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbustype - unknown status
32
264-
265 // is it one of the one-letter types?-
266 if (strchr(oneLetterTypes, c) != NULL)
strchr(oneLett..., c) != __nullDescription
TRUEevaluated 6353 times by 35 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
FALSEevaluated 3173 times by 35 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
3173-6353
267 return signature + 1;
executed 6353 times by 35 tests: return signature + 1;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
6353
268-
269 // is it an array?-
270 if (c == DBUS_TYPE_ARRAY) {
c == ((int) 'a')Description
TRUEevaluated 1790 times by 35 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
FALSEevaluated 1383 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • ...
1383-1790
271 // then it's valid if the next type is valid-
272 // or if it's a dict-entry-
273 c = *++signature;-
274 if (c == DBUS_DICT_ENTRY_BEGIN_CHAR) {
c == ((int) '{')Description
TRUEevaluated 581 times by 33 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 1209 times by 35 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
581-1209
275 // beginning of a dictionary entry-
276 // a dictionary entry has a key which is of basic types-
277 // and a free value-
278 c = *++signature;-
279 if (!isBasicType(c))
!isBasicType(c)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qdbustype - unknown status
FALSEevaluated 565 times by 33 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
16-565
280 return 0;
executed 16 times by 1 test: return 0;
Executed by:
  • tst_qdbustype - unknown status
16
281 signature = validateSingleType(signature + 1);-
282 return signature && *signature == DBUS_DICT_ENTRY_END_CHAR ? signature + 1 : 0;
executed 565 times by 33 tests: return signature && *signature == ((int) '}') ? signature + 1 : 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
565
283 }-
284-
285 return validateSingleType(signature);
executed 1209 times by 35 tests: return validateSingleType(signature);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
1209
286 }-
287-
288 if (c == DBUS_STRUCT_BEGIN_CHAR) {
c == ((int) '(')Description
TRUEevaluated 1341 times by 26 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
  • ...
FALSEevaluated 42 times by 5 tests
Evaluated by:
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbustype - unknown status
  • tst_qdbusxmlparser - unknown status
42-1341
289 // beginning of a struct-
290 ++signature;-
291 while (true) {-
292 signature = validateSingleType(signature);-
293 if (!signature)
!signatureDescription
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_qdbusmetatype - unknown status
  • tst_qdbustype - unknown status
FALSEevaluated 3369 times by 26 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
  • ...
34-3369
294 return 0;
executed 34 times by 2 tests: return 0;
Executed by:
  • tst_qdbusmetatype - unknown status
  • tst_qdbustype - unknown status
34
295 if (*signature == DBUS_STRUCT_END_CHAR)
*signature == ((int) ')')Description
TRUEevaluated 1307 times by 26 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
  • ...
FALSEevaluated 2062 times by 25 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
  • tst_qdbusxml2cpp - unknown status
1307-2062
296 return signature + 1;
executed 1307 times by 26 tests: return signature + 1;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
  • ...
1307
297 }
executed 2062 times by 25 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetaobject - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
  • tst_qdbusxml2cpp - unknown status
2062
298 }
never executed: end of block
0
299-
300 // invalid/unknown type-
301 return 0;
executed 42 times by 5 tests: return 0;
Executed by:
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusmetatype - unknown status
  • tst_qdbustype - unknown status
  • tst_qdbusxmlparser - unknown status
42
302}-
303-
304/*!-
305 \namespace QDBusUtil-
306 \inmodule QtDBus-
307 \internal-
308-
309 \brief The QDBusUtil namespace contains a few functions that are of general use when-
310 dealing with D-Bus strings.-
311*/-
312namespace QDBusUtil-
313{-
314 /*!-
315 \internal-
316 \since 4.5-
317 Dumps the contents of a Qt D-Bus argument from \a arg into a string.-
318 */-
319 QString argumentToString(const QVariant &arg)-
320 {-
321 QString out;-
322-
323#ifndef QT_BOOTSTRAPPED-
324 variantToString(arg, out);-
325#else-
326 Q_UNUSED(arg);-
327#endif-
328-
329 return out;
executed 115 times by 1 test: return out;
Executed by:
  • tst_qdbusmarshall - unknown status
115
330 }-
331-
332 /*!-
333 \internal-
334 \fn bool QDBusUtil::isValidPartOfObjectPath(const QStringRef &part)-
335 See QDBusUtil::isValidObjectPath-
336 */-
337 bool isValidPartOfObjectPath(const QStringRef &part)-
338 {-
339 if (part.isEmpty())
part.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 10229 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-10229
340 return false; // can't be valid if it's empty
never executed: return false;
0
341-
342 const QChar *c = part.unicode();-
343 for (int i = 0; i < part.length(); ++i)
i < part.length()Description
TRUEevaluated 63128 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 10229 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
10229-63128
344 if (!isValidCharacterNoDash(c[i]))
!isValidCharacterNoDash(c[i])Description
TRUEnever evaluated
FALSEevaluated 63128 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-63128
345 return false;
never executed: return false;
0
346-
347 return true;
executed 10229 times by 161 tests: return true;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
10229
348 }-
349-
350 /*!-
351 \internal-
352 \fn bool QDBusUtil::isValidPartOfObjectPath(const QString &part)-
353-
354 \overload-
355 */-
356-
357 /*!-
358 \fn bool QDBusUtil::isValidInterfaceName(const QString &ifaceName)-
359 Returns \c true if this is \a ifaceName is a valid interface name.-
360-
361 Valid interface names must:-
362 \list-
363 \li not be empty-
364 \li not exceed 255 characters in length-
365 \li be composed of dot-separated string components that contain only ASCII letters, digits-
366 and the underscore ("_") character-
367 \li contain at least two such components-
368 \endlist-
369 */-
370 bool isValidInterfaceName(const QString& ifaceName)-
371 {-
372 if (ifaceName.isEmpty() || ifaceName.length() > DBUS_MAXIMUM_NAME_LENGTH)
ifaceName.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 3572 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
ifaceName.length() > 255Description
TRUEnever evaluated
FALSEevaluated 3572 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-3572
373 return false;
never executed: return false;
0
374-
375 const auto parts = ifaceName.splitRef(QLatin1Char('.'));-
376 if (parts.count() < 2)
parts.count() < 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 3571 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1-3571
377 return false; // at least two parts
executed 1 time by 1 test: return false;
Executed by:
  • tst_qdbusmarshall - unknown status
1
378-
379 for (const QStringRef &part : parts)-
380 if (!isValidMemberName(part))
!isValidMemberName(part)Description
TRUEnever evaluated
FALSEevaluated 13109 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-13109
381 return false;
never executed: return false;
0
382-
383 return true;
executed 3571 times by 181 tests: return true;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
3571
384 }-
385-
386 /*!-
387 \fn bool QDBusUtil::isValidUniqueConnectionName(const QStringRef &connName)-
388 Returns \c true if \a connName is a valid unique connection name.-
389-
390 Unique connection names start with a colon (":") and are followed by a list of dot-separated-
391 components composed of ASCII letters, digits, the hyphen or the underscore ("_") character.-
392 */-
393 bool isValidUniqueConnectionName(const QStringRef &connName)-
394 {-
395 if (connName.isEmpty() || connName.length() > DBUS_MAXIMUM_NAME_LENGTH ||
connName.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 1148 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
connName.length() > 255Description
TRUEnever evaluated
FALSEevaluated 1148 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-1148
396 !connName.startsWith(QLatin1Char(':')))
!connName.star...tin1Char(':'))Description
TRUEevaluated 799 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 349 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
349-799
397 return false;
executed 799 times by 158 tests: return false;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
799
398-
399 const auto parts = connName.mid(1).split(QLatin1Char('.'));-
400 if (parts.count() < 1)
parts.count() < 1Description
TRUEnever evaluated
FALSEevaluated 349 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0-349
401 return false;
never executed: return false;
0
402-
403 for (const QStringRef &part : parts) {-
404 if (part.isEmpty())
part.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 698 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0-698
405 return false;
never executed: return false;
0
406-
407 const QChar* c = part.unicode();-
408 for (int j = 0; j < part.length(); ++j)
j < part.length()Description
TRUEevaluated 1396 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 698 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
698-1396
409 if (!isValidCharacter(c[j]))
!isValidCharacter(c[j])Description
TRUEnever evaluated
FALSEevaluated 1396 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0-1396
410 return false;
never executed: return false;
0
411 }
executed 698 times by 12 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
698
412-
413 return true;
executed 349 times by 12 tests: return true;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
349
414 }-
415-
416 /*!-
417 \fn bool QDBusUtil::isValidUniqueConnectionName(const QString &connName)-
418-
419 \overload-
420 */-
421-
422 /*!-
423 \fn bool QDBusUtil::isValidBusName(const QString &busName)-
424 Returns \c true if \a busName is a valid bus name.-
425-
426 A valid bus name is either a valid unique connection name or follows the rules:-
427 \list-
428 \li is not empty-
429 \li does not exceed 255 characters in length-
430 \li be composed of dot-separated string components that contain only ASCII letters, digits,-
431 hyphens or underscores ("_"), but don't start with a digit-
432 \li contains at least two such elements-
433 \endlist-
434-
435 \sa isValidUniqueConnectionName()-
436 */-
437 bool isValidBusName(const QString &busName)-
438 {-
439 if (busName.isEmpty() || busName.length() > DBUS_MAXIMUM_NAME_LENGTH)
busName.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 2238 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
busName.length() > 255Description
TRUEnever evaluated
FALSEevaluated 2238 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-2238
440 return false;
never executed: return false;
0
441-
442 if (busName.startsWith(QLatin1Char(':')))
busName.starts...tin1Char(':'))Description
TRUEevaluated 234 times by 12 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 2004 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
234-2004
443 return isValidUniqueConnectionName(busName);
executed 234 times by 12 tests: return isValidUniqueConnectionName(busName);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
234
444-
445 const auto parts = busName.splitRef(QLatin1Char('.'));-
446 if (parts.count() < 1)
parts.count() < 1Description
TRUEnever evaluated
FALSEevaluated 2004 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-2004
447 return false;
never executed: return false;
0
448-
449 for (const QStringRef &part : parts) {-
450 if (part.isEmpty())
part.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 6726 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-6726
451 return false;
never executed: return false;
0
452-
453 const QChar *c = part.unicode();-
454 if (isValidNumber(c[0]))
isValidNumber(c[0])Description
TRUEnever evaluated
FALSEevaluated 6726 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-6726
455 return false;
never executed: return false;
0
456 for (int j = 0; j < part.length(); ++j)
j < part.length()Description
TRUEevaluated 46499 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 6718 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
6718-46499
457 if (!isValidCharacter(c[j]))
!isValidCharacter(c[j])Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
FALSEevaluated 46491 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
8-46491
458 return false;
executed 8 times by 2 tests: return false;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
8
459 }
executed 6718 times by 160 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
6718
460-
461 return true;
executed 1996 times by 160 tests: return true;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1996
462 }-
463-
464 /*!-
465 \fn bool QDBusUtil::isValidMemberName(const QStringRef &memberName)-
466 Returns \c true if \a memberName is a valid member name. A valid member name does not exceed-
467 255 characters in length, is not empty, is composed only of ASCII letters, digits and-
468 underscores, but does not start with a digit.-
469 */-
470 bool isValidMemberName(const QStringRef &memberName)-
471 {-
472 if (memberName.isEmpty() || memberName.length() > DBUS_MAXIMUM_NAME_LENGTH)
memberName.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 16225 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
memberName.length() > 255Description
TRUEnever evaluated
FALSEevaluated 16225 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-16225
473 return false;
never executed: return false;
0
474-
475 const QChar* c = memberName.unicode();-
476 if (isValidNumber(c[0]))
isValidNumber(c[0])Description
TRUEnever evaluated
FALSEevaluated 16225 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-16225
477 return false;
never executed: return false;
0
478 for (int j = 0; j < memberName.length(); ++j)
j < memberName.length()Description
TRUEevaluated 118633 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 16224 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
16224-118633
479 if (!isValidCharacterNoDash(c[j]))
!isValidCharacterNoDash(c[j])Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 118632 times by 181 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1-118632
480 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qdbusmarshall - unknown status
1
481 return true;
executed 16224 times by 181 tests: return true;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
16224
482 }-
483-
484 /*!-
485 \fn bool QDBusUtil::isValidMemberName(const QString &memberName)-
486-
487 \overload-
488 */-
489-
490 /*!-
491 \fn bool QDBusUtil::isValidErrorName(const QString &errorName)-
492 Returns \c true if \a errorName is a valid error name. Valid error names are valid interface-
493 names and vice-versa, so this function is actually an alias for isValidInterfaceName.-
494 */-
495 bool isValidErrorName(const QString &errorName)-
496 {-
497 return isValidInterfaceName(errorName);
never executed: return isValidInterfaceName(errorName);
0
498 }-
499-
500 /*!-
501 \fn bool QDBusUtil::isValidObjectPath(const QString &path)-
502 Returns \c true if \a path is valid object path.-
503-
504 Valid object paths follow the rules:-
505 \list-
506 \li start with the slash character ("/")-
507 \li do not end in a slash, unless the path is just the initial slash-
508 \li do not contain any two slashes in sequence-
509 \li contain slash-separated parts, each of which is composed of ASCII letters, digits and-
510 underscores ("_")-
511 \endlist-
512 */-
513 bool isValidObjectPath(const QString &path)-
514 {-
515 if (path == QLatin1String("/"))
path == QLatin1String("/")Description
TRUEevaluated 1517 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEevaluated 3312 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1517-3312
516 return true;
executed 1517 times by 32 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
1517
517-
518 if (!path.startsWith(QLatin1Char('/')) || path.indexOf(QLatin1String("//")) != -1 ||
!path.startsWi...tin1Char('/'))Description
TRUEevaluated 19 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
FALSEevaluated 3293 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
path.indexOf(Q...g("//")) != -1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 3292 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1-3293
519 path.endsWith(QLatin1Char('/')))
path.endsWith(...tin1Char('/'))Description
TRUEnever evaluated
FALSEevaluated 3292 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-3292
520 return false;
executed 20 times by 2 tests: return false;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
20
521-
522 // it starts with /, so we skip the empty first part-
523 const auto parts = path.midRef(1).split(QLatin1Char('/'));-
524 for (const QStringRef &part : parts)-
525 if (!isValidPartOfObjectPath(part))
!isValidPartOfObjectPath(part)Description
TRUEnever evaluated
FALSEevaluated 10229 times by 161 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-10229
526 return false;
never executed: return false;
0
527-
528 return true;
executed 3292 times by 161 tests: return true;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • 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_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
3292
529 }-
530-
531 /*!-
532 \fn bool QDBusUtil::isValidBasicType(int type)-
533 Returns \c true if \a c is a valid, basic D-Bus type.-
534 */-
535 bool isValidBasicType(int c)-
536 {-
537 return isBasicType(c);
executed 1925 times by 31 tests: return isBasicType(c);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
1925
538 }-
539-
540 /*!-
541 \fn bool QDBusUtil::isValidFixedType(int type)-
542 Returns \c true if \a c is a valid, fixed D-Bus type.-
543 */-
544 bool isValidFixedType(int c)-
545 {-
546 return isFixedType(c);
executed 216 times by 3 tests: return isFixedType(c);
Executed by:
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbustype - unknown status
216
547 }-
548-
549-
550 /*!-
551 \fn bool QDBusUtil::isValidSignature(const QString &signature)-
552 Returns \c true if \a signature is a valid D-Bus type signature for one or more types.-
553 This function returns \c true if it can all of \a signature into valid, individual types and no-
554 characters remain in \a signature.-
555-
556 \sa isValidSingleSignature()-
557 */-
558 bool isValidSignature(const QString &signature)-
559 {-
560 QByteArray ba = signature.toLatin1();-
561 const char *data = ba.constData();-
562 while (true) {-
563 data = validateSingleType(data);-
564 if (!data)
!dataDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbustype - unknown status
FALSEevaluated 119 times by 4 tests
Evaluated by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
27-119
565 return false;
executed 27 times by 2 tests: return false;
Executed by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbustype - unknown status
27
566 if (*data == '\0')
*data == '\0'Description
TRUEevaluated 84 times by 4 tests
Evaluated by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
FALSEevaluated 35 times by 1 test
Evaluated by:
  • tst_qdbustype - unknown status
35-84
567 return true;
executed 84 times by 4 tests: return true;
Executed by:
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbustype - unknown status
84
568 }
executed 35 times by 1 test: end of block
Executed by:
  • tst_qdbustype - unknown status
35
569 }
never executed: end of block
0
570-
571 /*!-
572 \fn bool QDBusUtil::isValidSingleSignature(const QString &signature)-
573 Returns \c true if \a signature is a valid D-Bus type signature for exactly one full type. This-
574 function tries to convert the type signature into a D-Bus type and, if it succeeds and no-
575 characters remain in the signature, it returns \c true.-
576 */-
577 bool isValidSingleSignature(const QString &signature)-
578 {-
579 QByteArray ba = signature.toLatin1();-
580 const char *data = validateSingleType(ba.constData());-
581 return data && *data == '\0';
executed 4235 times by 35 tests: return data && *data == '\0';
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • ...
4235
582 }-
583-
584} // namespace QDBusUtil-
585-
586QT_END_NAMESPACE-
587-
588#endif // QT_NO_DBUS-
Source codeSwitch to Preprocessed file

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