qdbusdemarshaller.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusdemarshaller.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 "qdbusargument_p.h"-
41#include "qdbusconnection.h"-
42-
43#include <qscopedpointer.h>-
44-
45#include <stdlib.h>-
46-
47QT_BEGIN_NAMESPACE-
48-
49template <typename T>-
50static inline T qIterGet(DBusMessageIter *it)-
51{-
52 // Use a union of expected and largest type q_dbus_message_iter_get_basic-
53 // will return to ensure reading the wrong basic type does not result in-
54 // stack overwrite-
55 union {-
56 // The value to be extracted-
57 T t;-
58 // Largest type that q_dbus_message_iter_get_basic will return-
59 // according to dbus_message_iter_get_basic API documentation-
60 dbus_uint64_t maxValue;-
61 // A pointer to ensure no stack overwrite in case there is a platform-
62 // where sizeof(void*) > sizeof(dbus_uint64_t)-
63 void* ptr;-
64 } value;-
65-
66 // Initialize the value in case a narrower type is extracted to it.-
67 // Note that the result of extracting a narrower type in place of a wider-
68 // one and vice-versa will be platform-dependent.-
69 value.t = T();-
70-
71 q_dbus_message_iter_get_basic(it, &value);-
72 q_dbus_message_iter_next(it);-
73 return value.t;
executed 10427 times by 282 tests: return value.t;
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
  • ...
10427
74}-
75-
76QDBusDemarshaller::~QDBusDemarshaller()-
77{-
78}-
79-
80inline QString QDBusDemarshaller::currentSignature()-
81{-
82 char *sig = q_dbus_message_iter_get_signature(&iterator);-
83 QString retval = QString::fromUtf8(sig);-
84 q_dbus_free(sig);-
85-
86 return retval;
executed 1086 times by 5 tests: return retval;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusreply - unknown status
1086
87}-
88-
89inline uchar QDBusDemarshaller::toByte()-
90{-
91 return qIterGet<uchar>(&iterator);
executed 17 times by 1 test: return qIterGet<uchar>(&iterator);
Executed by:
  • tst_qdbusmarshall - unknown status
17
92}-
93-
94inline bool QDBusDemarshaller::toBool()-
95{-
96 return bool(qIterGet<dbus_bool_t>(&iterator));
executed 875 times by 150 tests: return bool(qIterGet<dbus_bool_t>(&iterator));
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
  • ...
875
97}-
98-
99inline ushort QDBusDemarshaller::toUShort()-
100{-
101 return qIterGet<dbus_uint16_t>(&iterator);
executed 37 times by 1 test: return qIterGet<dbus_uint16_t>(&iterator);
Executed by:
  • tst_qdbusmarshall - unknown status
37
102}-
103-
104inline short QDBusDemarshaller::toShort()-
105{-
106 return qIterGet<dbus_int16_t>(&iterator);
executed 57 times by 2 tests: return qIterGet<dbus_int16_t>(&iterator);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusmarshall - unknown status
57
107}-
108-
109inline int QDBusDemarshaller::toInt()-
110{-
111 return qIterGet<dbus_int32_t>(&iterator);
executed 664 times by 26 tests: return qIterGet<dbus_int32_t>(&iterator);
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_delayed - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
664
112}-
113-
114inline uint QDBusDemarshaller::toUInt()-
115{-
116 return qIterGet<dbus_uint32_t>(&iterator);
executed 511 times by 27 tests: return qIterGet<dbus_uint32_t>(&iterator);
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_delayed - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
511
117}-
118-
119inline qlonglong QDBusDemarshaller::toLongLong()-
120{-
121 return qIterGet<qlonglong>(&iterator);
executed 57 times by 3 tests: return qIterGet<qlonglong>(&iterator);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
57
122}-
123-
124inline qulonglong QDBusDemarshaller::toULongLong()-
125{-
126 return qIterGet<qulonglong>(&iterator);
executed 51 times by 17 tests: return qIterGet<qulonglong>(&iterator);
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_qdbusmarshall - unknown status
51
127}-
128-
129inline double QDBusDemarshaller::toDouble()-
130{-
131 return qIterGet<double>(&iterator);
executed 73 times by 1 test: return qIterGet<double>(&iterator);
Executed by:
  • tst_qdbusmarshall - unknown status
73
132}-
133-
134inline QString QDBusDemarshaller::toStringUnchecked()-
135{-
136 return QString::fromUtf8(qIterGet<char *>(&iterator));
executed 7356 times by 282 tests: return QString::fromUtf8(qIterGet<char *>(&iterator));
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
  • ...
7356
137}-
138-
139inline QString QDBusDemarshaller::toString()-
140{-
141 if (isCurrentTypeStringLike())
isCurrentTypeStringLike()Description
TRUEevaluated 2630 times by 21 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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-2630
142 return toStringUnchecked();
executed 2630 times by 21 tests: return toStringUnchecked();
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2630
143 else-
144 return QString();
executed 10 times by 1 test: return QString();
Executed by:
  • tst_qdbusmarshall - unknown status
10
145}-
146-
147inline QDBusObjectPath QDBusDemarshaller::toObjectPathUnchecked()-
148 {-
149 return QDBusObjectPath(QString::fromUtf8(qIterGet<char *>(&iterator)));
executed 680 times by 18 tests: return QDBusObjectPath(QString::fromUtf8(qIterGet<char *>(&iterator)));
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_qdbusmarshall - unknown status
  • tst_qdbusreply - unknown status
680
150 }-
151-
152inline QDBusObjectPath QDBusDemarshaller::toObjectPath()-
153{-
154 if (isCurrentTypeStringLike())
isCurrentTypeStringLike()Description
TRUEevaluated 141 times by 18 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_qdbusmarshall - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-141
155 return toObjectPathUnchecked();
executed 141 times by 18 tests: return toObjectPathUnchecked();
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_qdbusmarshall - unknown status
  • tst_qdbusreply - unknown status
141
156 else-
157 return QDBusObjectPath();
executed 10 times by 1 test: return QDBusObjectPath();
Executed by:
  • tst_qdbusmarshall - unknown status
10
158}-
159-
160inline QDBusSignature QDBusDemarshaller::toSignatureUnchecked()-
161 {-
162 return QDBusSignature(QString::fromUtf8(qIterGet<char *>(&iterator)));
executed 32 times by 1 test: return QDBusSignature(QString::fromUtf8(qIterGet<char *>(&iterator)));
Executed by:
  • tst_qdbusmarshall - unknown status
32
163 }-
164-
165inline QDBusSignature QDBusDemarshaller::toSignature()-
166{-
167 if (isCurrentTypeStringLike())
isCurrentTypeStringLike()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
10-14
168 return toSignatureUnchecked();
executed 14 times by 1 test: return toSignatureUnchecked();
Executed by:
  • tst_qdbusmarshall - unknown status
14
169 else-
170 return QDBusSignature();
executed 10 times by 1 test: return QDBusSignature();
Executed by:
  • tst_qdbusmarshall - unknown status
10
171}-
172-
173inline QDBusUnixFileDescriptor QDBusDemarshaller::toUnixFileDescriptor()-
174{-
175 QDBusUnixFileDescriptor fd;-
176 fd.giveFileDescriptor(qIterGet<dbus_int32_t>(&iterator));-
177 return fd;
executed 17 times by 1 test: return fd;
Executed by:
  • tst_qdbusmarshall - unknown status
17
178}-
179-
180inline QDBusVariant QDBusDemarshaller::toVariant()-
181{-
182 QDBusDemarshaller sub(capabilities);-
183 sub.message = q_dbus_message_ref(message);-
184 q_dbus_message_iter_recurse(&iterator, &sub.iterator);-
185 q_dbus_message_iter_next(&iterator);-
186-
187 return QDBusVariant( sub.toVariantInternal() );
executed 2995 times by 150 tests: return QDBusVariant( sub.toVariantInternal() );
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
  • ...
2995
188}-
189-
190QDBusArgument::ElementType QDBusDemarshaller::currentType()-
191{-
192 switch (q_dbus_message_iter_get_arg_type(&iterator)) {-
193 case DBUS_TYPE_BYTE:
executed 1 time by 1 test: case ((int) 'y'):
Executed by:
  • tst_qdbusmarshall - unknown status
1
194 case DBUS_TYPE_INT16:
executed 13 times by 1 test: case ((int) 'n'):
Executed by:
  • tst_qdbusmarshall - unknown status
13
195 case DBUS_TYPE_UINT16:
executed 11 times by 1 test: case ((int) 'q'):
Executed by:
  • tst_qdbusmarshall - unknown status
11
196 case DBUS_TYPE_INT32:
executed 160 times by 1 test: case ((int) 'i'):
Executed by:
  • tst_qdbusmarshall - unknown status
160
197 case DBUS_TYPE_UINT32:
executed 9 times by 1 test: case ((int) 'u'):
Executed by:
  • tst_qdbusmarshall - unknown status
9
198 case DBUS_TYPE_INT64:
executed 9 times by 1 test: case ((int) 'x'):
Executed by:
  • tst_qdbusmarshall - unknown status
9
199 case DBUS_TYPE_UINT64:
executed 7 times by 1 test: case ((int) 't'):
Executed by:
  • tst_qdbusmarshall - unknown status
7
200 case DBUS_TYPE_BOOLEAN:
executed 8 times by 1 test: case ((int) 'b'):
Executed by:
  • tst_qdbusmarshall - unknown status
8
201 case DBUS_TYPE_DOUBLE:
executed 27 times by 1 test: case ((int) 'd'):
Executed by:
  • tst_qdbusmarshall - unknown status
27
202 case DBUS_TYPE_STRING:
executed 40 times by 1 test: case ((int) 's'):
Executed by:
  • tst_qdbusmarshall - unknown status
40
203 case DBUS_TYPE_OBJECT_PATH:
executed 3 times by 1 test: case ((int) 'o'):
Executed by:
  • tst_qdbusmarshall - unknown status
3
204 case DBUS_TYPE_SIGNATURE:
executed 1 time by 1 test: case ((int) 'g'):
Executed by:
  • tst_qdbusmarshall - unknown status
1
205 return QDBusArgument::BasicType;
executed 289 times by 1 test: return QDBusArgument::BasicType;
Executed by:
  • tst_qdbusmarshall - unknown status
289
206-
207 case DBUS_TYPE_VARIANT:
executed 62 times by 1 test: case ((int) 'v'):
Executed by:
  • tst_qdbusmarshall - unknown status
62
208 return QDBusArgument::VariantType;
executed 62 times by 1 test: return QDBusArgument::VariantType;
Executed by:
  • tst_qdbusmarshall - unknown status
62
209-
210 case DBUS_TYPE_ARRAY:
executed 148 times by 1 test: case ((int) 'a'):
Executed by:
  • tst_qdbusmarshall - unknown status
148
211 switch (q_dbus_message_iter_get_element_type(&iterator)) {-
212 case DBUS_TYPE_BYTE:
executed 7 times by 1 test: case ((int) 'y'):
Executed by:
  • tst_qdbusmarshall - unknown status
7
213 case DBUS_TYPE_STRING:
executed 5 times by 1 test: case ((int) 's'):
Executed by:
  • tst_qdbusmarshall - unknown status
5
214 // QByteArray and QStringList-
215 return QDBusArgument::BasicType;
executed 12 times by 1 test: return QDBusArgument::BasicType;
Executed by:
  • tst_qdbusmarshall - unknown status
12
216 case DBUS_TYPE_DICT_ENTRY:
executed 27 times by 1 test: case ((int) 'e'):
Executed by:
  • tst_qdbusmarshall - unknown status
27
217 return QDBusArgument::MapType;
executed 27 times by 1 test: return QDBusArgument::MapType;
Executed by:
  • tst_qdbusmarshall - unknown status
27
218 default:
executed 109 times by 1 test: default:
Executed by:
  • tst_qdbusmarshall - unknown status
109
219 return QDBusArgument::ArrayType;
executed 109 times by 1 test: return QDBusArgument::ArrayType;
Executed by:
  • tst_qdbusmarshall - unknown status
109
220 }-
221-
222 case DBUS_TYPE_STRUCT:
executed 90 times by 1 test: case ((int) 'r'):
Executed by:
  • tst_qdbusmarshall - unknown status
90
223 return QDBusArgument::StructureType;
executed 90 times by 1 test: return QDBusArgument::StructureType;
Executed by:
  • tst_qdbusmarshall - unknown status
90
224 case DBUS_TYPE_DICT_ENTRY:
executed 79 times by 1 test: case ((int) 'e'):
Executed by:
  • tst_qdbusmarshall - unknown status
79
225 return QDBusArgument::MapEntryType;
executed 79 times by 1 test: return QDBusArgument::MapEntryType;
Executed by:
  • tst_qdbusmarshall - unknown status
79
226-
227 case DBUS_TYPE_UNIX_FD:
executed 5 times by 1 test: case ((int) 'h'):
Executed by:
  • tst_qdbusmarshall - unknown status
5
228 return capabilities & QDBusConnection::UnixFileDescriptorPassing ?
executed 5 times by 1 test: return capabilities & QDBusConnection::UnixFileDescriptorPassing ? QDBusArgument::BasicType : QDBusArgument::UnknownType;
Executed by:
  • tst_qdbusmarshall - unknown status
5
229 QDBusArgument::BasicType : QDBusArgument::UnknownType;
executed 5 times by 1 test: return capabilities & QDBusConnection::UnixFileDescriptorPassing ? QDBusArgument::BasicType : QDBusArgument::UnknownType;
Executed by:
  • tst_qdbusmarshall - unknown status
5
230-
231 case DBUS_TYPE_INVALID:
executed 21 times by 1 test: case ((int) '\0'):
Executed by:
  • tst_qdbusmarshall - unknown status
21
232 return QDBusArgument::UnknownType;
executed 21 times by 1 test: return QDBusArgument::UnknownType;
Executed by:
  • tst_qdbusmarshall - unknown status
21
233-
234// default:-
235// qWarning("QDBusDemarshaller: Found unknown D-Bus type %d '%c'",-
236// q_dbus_message_iter_get_arg_type(&iterator),-
237// q_dbus_message_iter_get_arg_type(&iterator));-
238 }-
239 return QDBusArgument::UnknownType;
never executed: return QDBusArgument::UnknownType;
0
240}-
241-
242QVariant QDBusDemarshaller::toVariantInternal()-
243{-
244 switch (q_dbus_message_iter_get_arg_type(&iterator)) {-
245 case DBUS_TYPE_BYTE:
executed 7 times by 1 test: case ((int) 'y'):
Executed by:
  • tst_qdbusmarshall - unknown status
7
246 return QVariant::fromValue(toByte());
executed 7 times by 1 test: return QVariant::fromValue(toByte());
Executed by:
  • tst_qdbusmarshall - unknown status
7
247 case DBUS_TYPE_INT16:
executed 35 times by 2 tests: case ((int) 'n'):
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusmarshall - unknown status
35
248 return QVariant::fromValue(toShort());
executed 35 times by 2 tests: return QVariant::fromValue(toShort());
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusmarshall - unknown status
35
249 case DBUS_TYPE_UINT16:
executed 17 times by 1 test: case ((int) 'q'):
Executed by:
  • tst_qdbusmarshall - unknown status
17
250 return QVariant::fromValue(toUShort());
executed 17 times by 1 test: return QVariant::fromValue(toUShort());
Executed by:
  • tst_qdbusmarshall - unknown status
17
251 case DBUS_TYPE_INT32:
executed 404 times by 26 tests: case ((int) 'i'):
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_delayed - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
404
252 return toInt();
executed 404 times by 26 tests: return toInt();
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_delayed - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
404
253 case DBUS_TYPE_UINT32:
executed 493 times by 27 tests: case ((int) 'u'):
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_delayed - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
493
254 return toUInt();
executed 493 times by 27 tests: return toUInt();
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_delayed - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
493
255 case DBUS_TYPE_DOUBLE:
executed 37 times by 1 test: case ((int) 'd'):
Executed by:
  • tst_qdbusmarshall - unknown status
37
256 return toDouble();
executed 37 times by 1 test: return toDouble();
Executed by:
  • tst_qdbusmarshall - unknown status
37
257 case DBUS_TYPE_BOOLEAN:
executed 859 times by 150 tests: case ((int) 'b'):
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
  • ...
859
258 return toBool();
executed 859 times by 150 tests: return toBool();
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
  • ...
859
259 case DBUS_TYPE_INT64:
executed 29 times by 2 tests: case ((int) 'x'):
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
29
260 return toLongLong();
executed 29 times by 2 tests: return toLongLong();
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
29
261 case DBUS_TYPE_UINT64:
executed 35 times by 17 tests: case ((int) 't'):
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_qdbusmarshall - unknown status
35
262 return toULongLong();
executed 35 times by 17 tests: return toULongLong();
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_qdbusmarshall - unknown status
35
263 case DBUS_TYPE_STRING:
executed 2535 times by 282 tests: case ((int) 's'):
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
  • ...
2535
264 return toStringUnchecked();
executed 2535 times by 282 tests: return toStringUnchecked();
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
  • ...
2535
265 case DBUS_TYPE_OBJECT_PATH:
executed 539 times by 17 tests: case ((int) 'o'):
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_qdbusmarshall - unknown status
539
266 return QVariant::fromValue(toObjectPathUnchecked());
executed 539 times by 17 tests: return QVariant::fromValue(toObjectPathUnchecked());
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_qdbusmarshall - unknown status
539
267 case DBUS_TYPE_SIGNATURE:
executed 18 times by 1 test: case ((int) 'g'):
Executed by:
  • tst_qdbusmarshall - unknown status
18
268 return QVariant::fromValue(toSignatureUnchecked());
executed 18 times by 1 test: return QVariant::fromValue(toSignatureUnchecked());
Executed by:
  • tst_qdbusmarshall - unknown status
18
269 case DBUS_TYPE_VARIANT:
executed 475 times by 135 tests: case ((int) 'v'):
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
475
270 return QVariant::fromValue(toVariant());
executed 475 times by 135 tests: return QVariant::fromValue(toVariant());
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
475
271-
272 case DBUS_TYPE_ARRAY:
executed 724 times by 28 tests: case ((int) 'a'):
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • ...
724
273 switch (q_dbus_message_iter_get_element_type(&iterator)) {-
274 case DBUS_TYPE_BYTE:
executed 33 times by 4 tests: case ((int) 'y'):
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
33
275 // QByteArray-
276 return toByteArrayUnchecked();
executed 33 times by 4 tests: return toByteArrayUnchecked();
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
33
277 case DBUS_TYPE_STRING:
executed 37 times by 8 tests: case ((int) 's'):
Executed by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
37
278 return toStringListUnchecked();
executed 37 times by 8 tests: return toStringListUnchecked();
Executed by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
37
279 case DBUS_TYPE_DICT_ENTRY:
executed 219 times by 21 tests: case ((int) 'e'):
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
219
280 return QVariant::fromValue(duplicate());
executed 219 times by 21 tests: return QVariant::fromValue(duplicate());
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
219
281-
282 default:
executed 435 times by 22 tests: default:
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
435
283 return QVariant::fromValue(duplicate());
executed 435 times by 22 tests: return QVariant::fromValue(duplicate());
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
435
284 }-
285-
286 case DBUS_TYPE_STRUCT:
executed 542 times by 21 tests: case ((int) 'r'):
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
542
287 return QVariant::fromValue(duplicate());
executed 542 times by 21 tests: return QVariant::fromValue(duplicate());
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
542
288-
289 case DBUS_TYPE_UNIX_FD:
executed 16 times by 1 test: case ((int) 'h'):
Executed by:
  • tst_qdbusmarshall - unknown status
16
290 if (capabilities & QDBusConnection::UnixFileDescriptorPassing)
capabilities &...criptorPassingDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
3-13
291 return QVariant::fromValue(toUnixFileDescriptor());
executed 13 times by 1 test: return QVariant::fromValue(toUnixFileDescriptor());
Executed by:
  • tst_qdbusmarshall - unknown status
13
292 // fall through-
293-
294 default:
code before this statement executed 3 times by 1 test: default:
Executed by:
  • tst_qdbusmarshall - unknown status
never executed: default:
0-3
295// qWarning("QDBusDemarshaller: Found unknown D-Bus type %d '%c'",-
296// q_dbus_message_iter_get_arg_type(&iterator),-
297// q_dbus_message_iter_get_arg_type(&iterator));-
298 char *ptr = 0;-
299 ptr += q_dbus_message_iter_get_arg_type(&iterator);-
300 q_dbus_message_iter_next(&iterator);-
301-
302 // I hope you never dereference this pointer!-
303 return QVariant::fromValue<void *>(ptr);
executed 3 times by 1 test: return QVariant::fromValue<void *>(ptr);
Executed by:
  • tst_qdbusmarshall - unknown status
3
304 };-
305}-
306-
307bool QDBusDemarshaller::isCurrentTypeStringLike()-
308{-
309 const int type = q_dbus_message_iter_get_arg_type(&iterator);-
310 switch (type) {-
311 case DBUS_TYPE_STRING: //FALLTHROUGH
executed 2636 times by 21 tests: case ((int) 's'):
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2636
312 case DBUS_TYPE_OBJECT_PATH: //FALLTHROUGH
executed 138 times by 18 tests: case ((int) 'o'):
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_qdbusmarshall - unknown status
  • tst_qdbusreply - unknown status
138
313 case DBUS_TYPE_SIGNATURE:
executed 11 times by 1 test: case ((int) 'g'):
Executed by:
  • tst_qdbusmarshall - unknown status
11
314 return true;
executed 2785 times by 21 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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2785
315 default:
executed 30 times by 1 test: default:
Executed by:
  • tst_qdbusmarshall - unknown status
30
316 return false;
executed 30 times by 1 test: return false;
Executed by:
  • tst_qdbusmarshall - unknown status
30
317 }-
318}-
319-
320QStringList QDBusDemarshaller::toStringListUnchecked()-
321{-
322 QStringList list;-
323-
324 QDBusDemarshaller sub(capabilities);-
325 q_dbus_message_iter_recurse(&iterator, &sub.iterator);-
326 q_dbus_message_iter_next(&iterator);-
327 while (!sub.atEnd())
!sub.atEnd()Description
TRUEevaluated 2191 times by 8 tests
Evaluated by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 42 times by 8 tests
Evaluated by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
42-2191
328 list.append(sub.toStringUnchecked());
executed 2191 times by 8 tests: list.append(sub.toStringUnchecked());
Executed by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
2191
329-
330 return list;
executed 42 times by 8 tests: return list;
Executed by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
42
331}-
332-
333QStringList QDBusDemarshaller::toStringList()-
334{-
335 if (q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_ARRAY
q_dbus_message...== ((int) 'a')Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
9-15
336 && q_dbus_message_iter_get_element_type(&iterator) == DBUS_TYPE_STRING)
q_dbus_message...== ((int) 's')Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
4-5
337 return toStringListUnchecked();
executed 5 times by 1 test: return toStringListUnchecked();
Executed by:
  • tst_qdbusmarshall - unknown status
5
338 else-
339 return QStringList();
executed 19 times by 1 test: return QStringList();
Executed by:
  • tst_qdbusmarshall - unknown status
19
340}-
341-
342QByteArray QDBusDemarshaller::toByteArrayUnchecked()-
343{-
344 DBusMessageIter sub;-
345 q_dbus_message_iter_recurse(&iterator, &sub);-
346 q_dbus_message_iter_next(&iterator);-
347 int len;-
348 char* data;-
349 q_dbus_message_iter_get_fixed_array(&sub,&data,&len);-
350 return QByteArray(data,len);
executed 40 times by 4 tests: return QByteArray(data,len);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
40
351}-
352-
353QByteArray QDBusDemarshaller::toByteArray()-
354{-
355 if (q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_ARRAY
q_dbus_message...== ((int) 'a')Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
11-15
356 && q_dbus_message_iter_get_element_type(&iterator) == DBUS_TYPE_BYTE) {
q_dbus_message...== ((int) 'y')Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusmarshall - unknown status
4-7
357 return toByteArrayUnchecked();
executed 7 times by 1 test: return toByteArrayUnchecked();
Executed by:
  • tst_qdbusmarshall - unknown status
7
358 }-
359 return QByteArray();
executed 19 times by 1 test: return QByteArray();
Executed by:
  • tst_qdbusmarshall - unknown status
19
360}-
361-
362bool QDBusDemarshaller::atEnd()-
363{-
364 // dbus_message_iter_has_next is broken if the list has one single element-
365 return q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_INVALID;
executed 14919 times by 282 tests: return q_dbus_message_iter_get_arg_type(&iterator) == ((int) '\0');
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
  • ...
14919
366}-
367-
368inline QDBusDemarshaller *QDBusDemarshaller::beginStructure()-
369{-
370 return beginCommon();
executed 371 times by 5 tests: return beginCommon();
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
371
371}-
372-
373inline QDBusDemarshaller *QDBusDemarshaller::beginArray()-
374{-
375 return beginCommon();
executed 339 times by 22 tests: return beginCommon();
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
339
376}-
377-
378inline QDBusDemarshaller *QDBusDemarshaller::beginMap()-
379{-
380 return beginCommon();
executed 274 times by 21 tests: return beginCommon();
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
274
381}-
382-
383inline QDBusDemarshaller *QDBusDemarshaller::beginMapEntry()-
384{-
385 return beginCommon();
executed 2678 times by 21 tests: return beginCommon();
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2678
386}-
387-
388QDBusDemarshaller *QDBusDemarshaller::beginCommon()-
389{-
390 QDBusDemarshaller *d = new QDBusDemarshaller(capabilities);-
391 d->parent = this;-
392 d->message = q_dbus_message_ref(message);-
393-
394 // recurse-
395 q_dbus_message_iter_recurse(&iterator, &d->iterator);-
396 q_dbus_message_iter_next(&iterator);-
397 return d;
executed 4418 times by 23 tests: return d;
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
4418
398}-
399-
400inline QDBusDemarshaller *QDBusDemarshaller::endStructure()-
401{-
402 return endCommon();
executed 371 times by 5 tests: return endCommon();
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
371
403}-
404-
405inline QDBusDemarshaller *QDBusDemarshaller::endArray()-
406{-
407 return endCommon();
executed 339 times by 22 tests: return endCommon();
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
339
408}-
409-
410inline QDBusDemarshaller *QDBusDemarshaller::endMap()-
411{-
412 return endCommon();
executed 274 times by 21 tests: return endCommon();
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
274
413}-
414-
415inline QDBusDemarshaller *QDBusDemarshaller::endMapEntry()-
416{-
417 return endCommon();
executed 2678 times by 21 tests: return endCommon();
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_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2678
418}-
419-
420QDBusDemarshaller *QDBusDemarshaller::endCommon()-
421{-
422 QDBusDemarshaller *retval = parent;-
423 delete this;-
424 return retval;
executed 3662 times by 23 tests: return retval;
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
3662
425}-
426-
427QDBusArgument QDBusDemarshaller::duplicate()-
428{-
429 QScopedPointer<QDBusDemarshaller> d(new QDBusDemarshaller(capabilities));-
430 d->iterator = iterator;-
431 d->message = q_dbus_message_ref(message);-
432-
433 q_dbus_message_iter_next(&iterator);-
434 return QDBusArgumentPrivate::create(d.take());
executed 1196 times by 23 tests: return QDBusArgumentPrivate::create(d.take());
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_qdbusinterface - unknown status
  • tst_qdbuslocalcalls - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
1196
435}-
436-
437QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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