qdbusxmlgenerator.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusxmlgenerator.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 <QtCore/qmetaobject.h>-
41#include <QtCore/qstringlist.h>-
42#include <QtCore/qdebug.h>-
43-
44#include "qdbusinterface_p.h" // for ANNOTATION_NO_WAIT-
45#include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_*-
46#include "qdbusconnection_p.h" // for the flags-
47#include "qdbusmetatype_p.h"-
48#include "qdbusmetatype.h"-
49#include "qdbusutil_p.h"-
50-
51#ifndef QT_NO_DBUS-
52-
53QT_BEGIN_NAMESPACE-
54-
55extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,-
56 const QMetaObject *base, int flags);-
57-
58static inline QString typeNameToXml(const char *typeName)-
59{-
60 // ### copied from qtextdocument.cpp-
61 // ### move this into Qt Core at some point-
62 QString plain = QLatin1String(typeName);-
63 QString rich;-
64 rich.reserve(int(plain.length() * 1.1));-
65 for (int i = 0; i < plain.length(); ++i) {
i < plain.length()Description
TRUEevaluated 20705 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 2591 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2591-20705
66 if (plain.at(i) == QLatin1Char('<'))
plain.at(i) ==...atin1Char('<')Description
TRUEevaluated 720 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 19985 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
720-19985
67 rich += QLatin1String("&lt;");
executed 720 times by 1 test: rich += QLatin1String("&lt;");
Executed by:
  • tst_qdbuscpp2xml - unknown status
720
68 else if (plain.at(i) == QLatin1Char('>'))
plain.at(i) ==...atin1Char('>')Description
TRUEevaluated 720 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 19265 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
720-19265
69 rich += QLatin1String("&gt;");
executed 720 times by 1 test: rich += QLatin1String("&gt;");
Executed by:
  • tst_qdbuscpp2xml - unknown status
720
70 else if (plain.at(i) == QLatin1Char('&'))
plain.at(i) ==...atin1Char('&')Description
TRUEnever evaluated
FALSEevaluated 19265 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
0-19265
71 rich += QLatin1String("&amp;");
never executed: rich += QLatin1String("&amp;");
0
72 else-
73 rich += plain.at(i);
executed 19265 times by 9 tests: rich += plain.at(i);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
19265
74 }-
75 return rich;
executed 2591 times by 9 tests: return rich;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
2591
76}-
77-
78static inline QLatin1String accessAsString(bool read, bool write)-
79{-
80 if (read)
readDescription
TRUEevaluated 175 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEnever evaluated
0-175
81 return write ? QLatin1String("readwrite") : QLatin1String("read") ;
executed 175 times by 3 tests: return write ? QLatin1String("readwrite") : QLatin1String("read") ;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
175
82 else-
83 return write ? QLatin1String("write") : QLatin1String("") ;
never executed: return write ? QLatin1String("write") : QLatin1String("") ;
0
84}-
85-
86// implement the D-Bus org.freedesktop.DBus.Introspectable interface-
87// we do that by analysing the metaObject of all the adaptor interfaces-
88-
89static QString generateInterfaceXml(const QMetaObject *mo, int flags, int methodOffset, int propOffset)-
90{-
91 QString retval;-
92-
93 // start with properties:-
94 if (flags & (QDBusConnection::ExportScriptableProperties |
flags & (QDBus...bleProperties)Description
TRUEevaluated 146 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 30 times by 3 tests
Evaluated by:
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
30-146
95 QDBusConnection::ExportNonScriptableProperties)) {
flags & (QDBus...bleProperties)Description
TRUEevaluated 146 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 30 times by 3 tests
Evaluated by:
  • tst_qdbuscontext - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
30-146
96 for (int i = propOffset; i < mo->propertyCount(); ++i) {
i < mo->propertyCount()Description
TRUEevaluated 187 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 146 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
146-187
97-
98 QMetaProperty mp = mo->property(i);-
99-
100 if (!((mp.isScriptable() && (flags & QDBusConnection::ExportScriptableProperties)) ||
mp.isScriptable()Description
TRUEevaluated 187 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEnever evaluated
(flags & QDBus...bleProperties)Description
TRUEevaluated 187 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEnever evaluated
0-187
101 (!mp.isScriptable() && (flags & QDBusConnection::ExportNonScriptableProperties))))
!mp.isScriptable()Description
TRUEnever evaluated
FALSEnever evaluated
(flags & QDBus...bleProperties)Description
TRUEnever evaluated
FALSEnever evaluated
0
102 continue;
never executed: continue;
0
103-
104 int typeId = mp.userType();-
105 if (!typeId)
!typeIdDescription
TRUEnever evaluated
FALSEevaluated 187 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
0-187
106 continue;
never executed: continue;
0
107 const char *signature = QDBusMetaType::typeToSignature(typeId);-
108 if (!signature)
!signatureDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 175 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
12-175
109 continue;
executed 12 times by 1 test: continue;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
12
110-
111 retval += QString::fromLatin1(" <property name=\"%1\" type=\"%2\" access=\"%3\"")-
112 .arg(QLatin1String(mp.name()),-
113 QLatin1String(signature),-
114 accessAsString(mp.isReadable(), mp.isWritable()));-
115-
116 if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
QDBusMetaType:...riant::InvalidDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 174 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
1-174
117 const char *typeName = QMetaType::typeName(typeId);-
118 retval += QString::fromLatin1(">\n <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n </property>\n")-
119 .arg(typeNameToXml(typeName));-
120 } else {
executed 1 time by 1 test: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
1
121 retval += QLatin1String("/>\n");-
122 }
executed 174 times by 3 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
174
123 }-
124 }
executed 146 times by 10 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
146
125-
126 // now add methods:-
127 for (int i = methodOffset; i < mo->methodCount(); ++i) {
i < mo->methodCount()Description
TRUEevaluated 3923 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 176 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
176-3923
128 QMetaMethod mm = mo->method(i);-
129-
130 bool isSignal;-
131 if (mm.methodType() == QMetaMethod::Signal)
mm.methodType(...Method::SignalDescription
TRUEevaluated 1641 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 2282 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
1641-2282
132 // adding a signal-
133 isSignal = true;
executed 1641 times by 4 tests: isSignal = true;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
1641
134 else if (mm.access() == QMetaMethod::Public && (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method))
mm.access() ==...Method::PublicDescription
TRUEevaluated 1334 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 948 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
mm.methodType(...taMethod::SlotDescription
TRUEevaluated 1176 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
mm.methodType(...Method::MethodDescription
TRUEevaluated 158 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEnever evaluated
0-1334
135 isSignal = false;
executed 1334 times by 11 tests: isSignal = false;
Executed by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
1334
136 else-
137 continue; // neither signal nor public slot
executed 948 times by 1 test: continue;
Executed by:
  • tst_qdbuscpp2xml - unknown status
948
138-
139 if (isSignal && !(flags & (QDBusConnection::ExportScriptableSignals |
isSignalDescription
TRUEevaluated 1641 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 1334 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
!(flags & (QDB...tableSignals))Description
TRUEevaluated 520 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 1121 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
520-1641
140 QDBusConnection::ExportNonScriptableSignals)))
!(flags & (QDB...tableSignals))Description
TRUEevaluated 520 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 1121 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
520-1121
141 continue; // we're not exporting any signals
executed 520 times by 1 test: continue;
Executed by:
  • tst_qdbuscpp2xml - unknown status
520
142 if (!isSignal && (!(flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) &&
!isSignalDescription
TRUEevaluated 1334 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 1121 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
!(flags & (QDB...iptableSlots))Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 1286 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
48-1334
143 !(flags & (QDBusConnection::ExportScriptableInvokables | QDBusConnection::ExportNonScriptableInvokables))))
!(flags & (QDB...leInvokables))Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEnever evaluated
0-48
144 continue; // we're not exporting any slots or invokables
executed 48 times by 1 test: continue;
Executed by:
  • tst_qdbuscpp2xml - unknown status
48
145-
146 // we want to skip non-scriptable stuff as early as possible to avoid bogus warning-
147 // for methods that are not being exported at all-
148 bool isScriptable = mm.attributes() & QMetaMethod::Scriptable;-
149 if (!isScriptable && !(flags & (isSignal ? QDBusConnection::ExportNonScriptableSignals : QDBusConnection::ExportNonScriptableInvokables | QDBusConnection::ExportNonScriptableSlots)))
!isScriptableDescription
TRUEevaluated 1573 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 834 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
!(flags & (isS...iptableSlots))Description
TRUEevaluated 312 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 1261 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
312-1573
150 continue;
executed 312 times by 1 test: continue;
Executed by:
  • tst_qdbuscpp2xml - unknown status
312
151-
152 QString xml = QString::fromLatin1(" <%1 name=\"%2\">\n")-
153 .arg(isSignal ? QLatin1String("signal") : QLatin1String("method"))-
154 .arg(QString::fromLatin1(mm.name()));-
155-
156 // check the return type first-
157 int typeId = mm.returnType();-
158 if (typeId != QMetaType::UnknownType && typeId != QMetaType::Void) {
typeId != QMet...e::UnknownTypeDescription
TRUEevaluated 2091 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
typeId != QMetaType::VoidDescription
TRUEevaluated 681 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 1410 times by 10 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusthreading - unknown status
4-2091
159 const char *typeName = QDBusMetaType::typeToSignature(typeId);-
160 if (typeName) {
typeNameDescription
TRUEevaluated 681 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEnever evaluated
0-681
161 xml += QString::fromLatin1(" <arg type=\"%1\" direction=\"out\"/>\n")-
162 .arg(typeNameToXml(typeName));-
163-
164 // do we need to describe this argument?-
165 if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
QDBusMetaType:...riant::InvalidDescription
TRUEevaluated 75 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 606 times by 9 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
75-606
166 xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
executed 75 times by 4 tests: xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n") .arg(typeNameToXml(QMetaType::typeName(typeId)));
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
75
167 .arg(typeNameToXml(QMetaType::typeName(typeId)));
executed 75 times by 4 tests: xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n") .arg(typeNameToXml(QMetaType::typeName(typeId)));
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
75
168 } else {
executed 681 times by 9 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
681
169 qWarning() << "Unsupported return type" << typeId << QMetaType::typeName(typeId) << "in method" << mm.name();-
170 continue;
never executed: continue;
0
171 }-
172 }-
173 else if (typeId == QMetaType::UnknownType) {
typeId == QMet...e::UnknownTypeDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 1410 times by 10 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusthreading - unknown status
4-1410
174 qWarning() << "Invalid return type in method" << mm.name();-
175 continue; // wasn't a valid type
executed 4 times by 2 tests: continue;
Executed by:
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
4
176 }-
177-
178 QList<QByteArray> names = mm.parameterNames();-
179 QVector<int> types;-
180 QString errorMsg;-
181 int inputCount = qDBusParametersForMethod(mm, types, errorMsg);-
182 if (inputCount == -1) {
inputCount == -1Description
TRUEnever evaluated
FALSEevaluated 2091 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0-2091
183 qWarning() << "Skipped method" << mm.name() << ":" << qPrintable(errorMsg);-
184 continue; // invalid form
never executed: continue;
0
185 }-
186 if (isSignal && inputCount + 1 != types.count())
isSignalDescription
TRUEevaluated 861 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 1230 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
inputCount + 1... types.count()Description
TRUEnever evaluated
FALSEevaluated 861 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
0-1230
187 continue; // signal with output arguments?
never executed: continue;
0
188 if (isSignal && types.at(inputCount) == QDBusMetaTypeId::message())
isSignalDescription
TRUEevaluated 861 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 1230 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
types.at(input...eId::message()Description
TRUEnever evaluated
FALSEevaluated 861 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
0-1230
189 continue; // signal with QDBusMessage argument?
never executed: continue;
0
190 if (isSignal && mm.attributes() & QMetaMethod::Cloned)
isSignalDescription
TRUEevaluated 861 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 1230 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
mm.attributes(...Method::ClonedDescription
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 781 times by 4 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
80-1230
191 continue; // cloned signal?
executed 80 times by 1 test: continue;
Executed by:
  • tst_qdbuscpp2xml - unknown status
80
192-
193 int j;-
194 for (j = 1; j < types.count(); ++j) {
j < types.count()Description
TRUEevaluated 3487 times by 8 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
FALSEevaluated 2011 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
2011-3487
195 // input parameter for a slot or output for a signal-
196 if (types.at(j) == QDBusMetaTypeId::message()) {
types.at(j) ==...eId::message()Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
FALSEevaluated 3485 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingreply - unknown status
2-3485
197 isScriptable = true;-
198 continue;
executed 2 times by 2 tests: continue;
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
2
199 }-
200-
201 QString name;-
202 if (!names.at(j - 1).isEmpty())
!names.at(j - 1).isEmpty()Description
TRUEevaluated 3426 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingreply - unknown status
FALSEevaluated 59 times by 2 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
59-3426
203 name = QString::fromLatin1("name=\"%1\" ").arg(QLatin1String(names.at(j - 1)));
executed 3426 times by 7 tests: name = QString::fromLatin1("name=\"%1\" ").arg(QLatin1String(names.at(j - 1)));
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingreply - unknown status
3426
204-
205 bool isOutput = isSignal || j > inputCount;
isSignalDescription
TRUEevaluated 3070 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 415 times by 6 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuspendingreply - unknown status
j > inputCountDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
FALSEevaluated 404 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
11-3070
206-
207 const char *signature = QDBusMetaType::typeToSignature(types.at(j));-
208 xml += QString::fromLatin1(" <arg %1type=\"%2\" direction=\"%3\"/>\n")-
209 .arg(name)-
210 .arg(QLatin1String(signature))-
211 .arg(isOutput ? QLatin1String("out") : QLatin1String("in"));-
212-
213 // do we need to describe this argument?-
214 if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
QDBusMetaType:...riant::InvalidDescription
TRUEevaluated 1834 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 1651 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingreply - unknown status
1651-1834
215 const char *typeName = QMetaType::typeName(types.at(j));-
216 xml += QString::fromLatin1(" <annotation name=\"org.qtproject.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n")-
217 .arg(isOutput ? QLatin1String("Out") : QLatin1String("In"))-
218 .arg(isOutput && !isSignal ? j - inputCount : j - 1)-
219 .arg(typeNameToXml(typeName));-
220 }
executed 1834 times by 3 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
1834
221 }
executed 3485 times by 7 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingreply - unknown status
3485
222-
223 int wantedMask;-
224 if (isScriptable)
isScriptableDescription
TRUEevaluated 783 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
FALSEevaluated 1228 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
783-1228
225 wantedMask = isSignal ? QDBusConnection::ExportScriptableSignals
executed 783 times by 5 tests: wantedMask = isSignal ? QDBusConnection::ExportScriptableSignals : QDBusConnection::ExportScriptableSlots;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
isSignalDescription
TRUEevaluated 480 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 303 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
303-783
226 : QDBusConnection::ExportScriptableSlots;
executed 783 times by 5 tests: wantedMask = isSignal ? QDBusConnection::ExportScriptableSignals : QDBusConnection::ExportScriptableSlots;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
783
227 else-
228 wantedMask = isSignal ? QDBusConnection::ExportNonScriptableSignals
executed 1228 times by 10 tests: wantedMask = isSignal ? QDBusConnection::ExportNonScriptableSignals : QDBusConnection::ExportNonScriptableSlots;
Executed by:
  • tst_qdbusabstractadaptor - 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
isSignalDescription
TRUEevaluated 301 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 927 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
301-1228
229 : QDBusConnection::ExportNonScriptableSlots;
executed 1228 times by 10 tests: wantedMask = isSignal ? QDBusConnection::ExportNonScriptableSignals : QDBusConnection::ExportNonScriptableSlots;
Executed by:
  • tst_qdbusabstractadaptor - 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
1228
230 if ((flags & wantedMask) != wantedMask)
(flags & wante... != wantedMaskDescription
TRUEnever evaluated
FALSEevaluated 2011 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0-2011
231 continue;
never executed: continue;
0
232-
233 if (qDBusCheckAsyncTag(mm.tag()))
qDBusCheckAsyncTag(mm.tag())Description
TRUEnever evaluated
FALSEevaluated 2011 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0-2011
234 // add the no-reply annotation-
235 xml += QLatin1String(" <annotation name=\"" ANNOTATION_NO_WAIT "\""
never executed: xml += QLatin1String(" <annotation name=\"" "org.freedesktop.DBus.Method.NoReply" "\"" " value=\"true\"/>\n");
0
236 " value=\"true\"/>\n");
never executed: xml += QLatin1String(" <annotation name=\"" "org.freedesktop.DBus.Method.NoReply" "\"" " value=\"true\"/>\n");
0
237-
238 retval += xml;-
239 retval += QString::fromLatin1(" </%1>\n")-
240 .arg(isSignal ? QLatin1String("signal") : QLatin1String("method"));-
241 }
executed 2011 times by 11 tests: end of block
Executed by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
2011
242-
243 return retval;
executed 176 times by 11 tests: return retval;
Executed by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
176
244}-
245-
246QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,-
247 const QMetaObject *base, int flags)-
248{-
249 if (interface.isEmpty())
interface.isEmpty()Description
TRUEevaluated 91 times by 8 tests
Evaluated by:
  • 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_qdbusthreading - unknown status
FALSEevaluated 89 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
89-91
250 // generate the interface name from the meta object-
251 interface = qDBusInterfaceFromMetaObject(mo);
executed 91 times by 8 tests: interface = qDBusInterfaceFromMetaObject(mo);
Executed by:
  • 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_qdbusthreading - unknown status
91
252-
253 QString xml;-
254 int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTROSPECTION);-
255 if (idx >= mo->classInfoOffset())
idx >= mo->classInfoOffset()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusinterface - unknown status
FALSEevaluated 176 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
4-176
256 return QString::fromUtf8(mo->classInfo(idx).value());
executed 4 times by 1 test: return QString::fromUtf8(mo->classInfo(idx).value());
Executed by:
  • tst_qdbusinterface - unknown status
4
257 else-
258 xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());
executed 176 times by 11 tests: xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());
Executed by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
176
259-
260 if (xml.isEmpty())
xml.isEmpty()Description
TRUEevaluated 41 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 135 times by 11 tests
Evaluated by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
41-135
261 return QString(); // don't add an empty interface
executed 41 times by 1 test: return QString();
Executed by:
  • tst_qdbusabstractadaptor - unknown status
41
262 return QString::fromLatin1(" <interface name=\"%1\">\n%2 </interface>\n")
executed 135 times by 11 tests: return QString::fromLatin1(" <interface name=\"%1\">\n%2 </interface>\n") .arg(interface, xml);
Executed by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
135
263 .arg(interface, xml);
executed 135 times by 11 tests: return QString::fromLatin1(" <interface name=\"%1\">\n%2 </interface>\n") .arg(interface, xml);
Executed by:
  • 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_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
135
264}-
265#if 0-
266QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, const QMetaObject *base,-
267 int flags)-
268{-
269 if (interface.isEmpty()) {-
270 // generate the interface name from the meta object-
271 int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTERFACE);-
272 if (idx >= mo->classInfoOffset()) {-
273 interface = QLatin1String(mo->classInfo(idx).value());-
274 } else {-
275 interface = QLatin1String(mo->className());-
276 interface.replace(QLatin1String("::"), QLatin1String("."));-
277-
278 if (interface.startsWith(QLatin1String("QDBus"))) {-
279 interface.prepend(QLatin1String("org.qtproject.QtDBus."));-
280 } else if (interface.startsWith(QLatin1Char('Q')) &&-
281 interface.length() >= 2 && interface.at(1).isUpper()) {-
282 // assume it's Qt-
283 interface.prepend(QLatin1String("org.qtproject.Qt."));-
284 } else if (!QCoreApplication::instance()||-
285 QCoreApplication::instance()->applicationName().isEmpty()) {-
286 interface.prepend(QLatin1String("local."));-
287 } else {-
288 interface.prepend(QLatin1Char('.')).prepend(QCoreApplication::instance()->applicationName());-
289 QStringList domainName =-
290 QCoreApplication::instance()->organizationDomain().split(QLatin1Char('.'),-
291 QString::SkipEmptyParts);-
292 if (domainName.isEmpty())-
293 interface.prepend(QLatin1String("local."));-
294 else-
295 for (int i = 0; i < domainName.count(); ++i)-
296 interface.prepend(QLatin1Char('.')).prepend(domainName.at(i));-
297 }-
298 }-
299 }-
300-
301 QString xml;-
302 int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTROSPECTION);-
303 if (idx >= mo->classInfoOffset())-
304 return QString::fromUtf8(mo->classInfo(idx).value());-
305 else-
306 xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());-
307-
308 if (xml.isEmpty())-
309 return QString(); // don't add an empty interface-
310 return QString::fromLatin1(" <interface name=\"%1\">\n%2 </interface>\n")-
311 .arg(interface, xml);-
312}-
313-
314#endif-
315-
316QT_END_NAMESPACE-
317-
318#endif // QT_NO_DBUS-
Source codeSwitch to Preprocessed file

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