qdbusabstractinterface.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusabstractinterface.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtDBus module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include "qdbusabstractinterface.h"-
42#include "qdbusabstractinterface_p.h"-
43-
44#include <qcoreapplication.h>-
45#include <qthread.h>-
46-
47#include "qdbusargument.h"-
48#include "qdbuspendingcall.h"-
49#include "qdbusmessage_p.h"-
50#include "qdbusmetaobject_p.h"-
51#include "qdbusmetatype_p.h"-
52#include "qdbusservicewatcher.h"-
53#include "qdbusutil_p.h"-
54-
55#include <qdebug.h>-
56-
57#ifndef QT_NO_DBUS-
58-
59QT_BEGIN_NAMESPACE-
60-
61namespace {-
62// ### Qt6: change to a regular QEvent (customEvent)-
63// We need to use a QMetaCallEvent here because we can't override customEvent() in-
64// Qt 5. Since QDBusAbstractInterface is meant to be derived from, the vtables of-
65// classes in generated code will have a pointer to QObject::customEvent instead-
66// of to QDBusAbstractInterface::customEvent.-
67// See solution in Patch Set 1 of this change in the Qt Gerrit servers.-
68// (https://codereview.qt-project.org/#/c/126384/1)-
69class DisconnectRelayEvent : public QMetaCallEvent-
70{-
71public:-
72 DisconnectRelayEvent(QObject *sender, const QMetaMethod &m)-
73 : QMetaCallEvent(0, 0, Q_NULLPTR, sender, m.methodIndex())-
74 {}
executed 102 times by 21 tests: end of block
Executed by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
102
75-
76 void placeMetaCall(QObject *object) Q_DECL_OVERRIDE-
77 {-
78 QDBusAbstractInterface *iface = static_cast<QDBusAbstractInterface *>(object);-
79 QDBusAbstractInterfacePrivate::finishDisconnectNotify(iface, signalId());-
80 }
executed 15 times by 2 tests: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
15
81};-
82}-
83-
84static QDBusError checkIfValid(const QString &service, const QString &path,-
85 const QString &interface, bool isDynamic, bool isPeer)-
86{-
87 // We should be throwing exceptions here... oh well-
88 QDBusError error;-
89-
90 // dynamic interfaces (QDBusInterface) can have empty interfaces, but not service and object paths-
91 // non-dynamic is the opposite: service and object paths can be empty, but not the interface-
92 if (!isDynamic) {
!isDynamicDescription
TRUEevaluated 914 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 135 times by 12 tests
Evaluated by:
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
135-914
93 // use assertion here because this should never happen, at all-
94 Q_ASSERT_X(!interface.isEmpty(), "QDBusAbstractInterface", "Interface name cannot be empty");-
95 }
executed 914 times by 160 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
914
96 if (!QDBusUtil::checkBusName(service, (isDynamic && !isPeer) ? QDBusUtil::EmptyNotAllowed : QDBusUtil::EmptyAllowed, &error))
!QDBusUtil::ch...lowed, &error)Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 1042 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
7-1042
97 return error;
executed 7 times by 1 test: return error;
Executed by:
  • tst_qdbusabstractinterface - unknown status
7
98 if (!QDBusUtil::checkObjectPath(path, isDynamic ? QDBusUtil::EmptyNotAllowed : QDBusUtil::EmptyAllowed, &error))
!QDBusUtil::ch...lowed, &error)Description
TRUEevaluated 15 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 1027 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
15-1027
99 return error;
executed 15 times by 2 tests: return error;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
15
100 if (!QDBusUtil::checkInterfaceName(interface, QDBusUtil::EmptyAllowed, &error))
!QDBusUtil::ch...lowed, &error)Description
TRUEnever evaluated
FALSEevaluated 1027 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-1027
101 return error;
never executed: return error;
0
102-
103 // no error-
104 return QDBusError();
executed 1027 times by 160 tests: return QDBusError();
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
  • ...
1027
105}-
106-
107QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv,-
108 const QString &p,-
109 const QString &iface,-
110 const QDBusConnection& con,-
111 bool isDynamic)-
112 : connection(con), service(serv), path(p), interface(iface),-
113 lastError(checkIfValid(serv, p, iface, isDynamic, (connectionPrivate() &&-
114 connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode))),-
115 timeout(-1),-
116 isValid(!lastError.isValid())-
117{-
118 if (!isValid)
!isValidDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 1027 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
22-1027
119 return;
executed 22 times by 2 tests: return;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
22
120-
121 if (!connection.isConnected()) {
!connection.isConnected()Description
TRUEevaluated 8 times by 8 tests
Evaluated by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_no_bus - unknown status
  • tst_qdbusconnection_no_libdbus - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 1019 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
8-1019
122 lastError = QDBusError(QDBusError::Disconnected,-
123 QDBusUtil::disconnectedErrorMessage());-
124 } else if (!service.isEmpty()) {
executed 8 times by 8 tests: end of block
Executed by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_no_bus - unknown status
  • tst_qdbusconnection_no_libdbus - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
!service.isEmpty()Description
TRUEevaluated 914 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 105 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
8-914
125 currentOwner = connectionPrivate()->getNameOwner(service); // verify the name owner-
126 if (currentOwner.isEmpty()) {
currentOwner.isEmpty()Description
TRUEevaluated 41 times by 19 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_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 873 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
41-873
127 lastError = connectionPrivate()->lastError;-
128 }
executed 41 times by 19 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
41
129 }
executed 914 times by 158 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
914
130}
executed 1027 times by 160 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1027
131-
132void QDBusAbstractInterfacePrivate::initOwnerTracking()-
133{-
134 if (!isValid || !connection.isConnected() || !connectionPrivate()->shouldWatchService(service))
!isValidDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 1027 times by 160 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
!connection.isConnected()Description
TRUEevaluated 8 times by 8 tests
Evaluated by:
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_no_bus - unknown status
  • tst_qdbusconnection_no_libdbus - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
FALSEevaluated 1019 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
!connectionPri...rvice(service)Description
TRUEevaluated 427 times by 158 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 592 times by 154 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
8-1027
135 return;
executed 457 times by 160 tests: return;
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
  • ...
457
136 QObject::connect(new QDBusServiceWatcher(service, connection, QDBusServiceWatcher::WatchForOwnerChange, q_func()),-
137 SIGNAL(serviceOwnerChanged(QString,QString,QString)),-
138 q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString)));-
139}
executed 592 times by 154 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
592
140-
141bool QDBusAbstractInterfacePrivate::canMakeCalls() const-
142{-
143 // recheck only if we have a wildcard (i.e. empty) service or path-
144 // if any are empty, set the error message according to QDBusUtil-
145 if (service.isEmpty() && connectionPrivate()->mode != QDBusConnectionPrivate::PeerMode)
service.isEmpty()Description
TRUEevaluated 114 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 916 times by 157 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
connectionPriv...vate::PeerModeDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 102 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
12-916
146 return QDBusUtil::checkBusName(service, QDBusUtil::EmptyNotAllowed, &lastError);
executed 12 times by 1 test: return QDBusUtil::checkBusName(service, QDBusUtil::EmptyNotAllowed, &lastError);
Executed by:
  • tst_qdbusabstractinterface - unknown status
12
147 if (path.isEmpty())
path.isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 1006 times by 157 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
12-1006
148 return QDBusUtil::checkObjectPath(path, QDBusUtil::EmptyNotAllowed, &lastError);
executed 12 times by 1 test: return QDBusUtil::checkObjectPath(path, QDBusUtil::EmptyNotAllowed, &lastError);
Executed by:
  • tst_qdbusabstractinterface - unknown status
12
149 return true;
executed 1006 times by 157 tests: return true;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1006
150}-
151-
152bool QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, void *returnValuePtr) const-
153{-
154 if (!isValid || !canMakeCalls()) // can't make calls
!isValidDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 204 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
!canMakeCalls()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 196 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
6-204
155 return false;
executed 14 times by 1 test: return false;
Executed by:
  • tst_qdbusabstractinterface - unknown status
14
156-
157 const int type = mp.userType();-
158 // is this metatype registered?-
159 const char *expectedSignature = "";-
160 if (int(mp.type()) != QMetaType::QVariant) {
int(mp.type())...Type::QVariantDescription
TRUEevaluated 196 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEnever evaluated
0-196
161 expectedSignature = QDBusMetaType::typeToSignature(type);-
162 if (expectedSignature == 0) {
expectedSignature == 0Description
TRUEnever evaluated
FALSEevaluated 196 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
0-196
163 qWarning("QDBusAbstractInterface: type %s must be registered with Qt D-Bus before it can be "-
164 "used to read property %s.%s",-
165 mp.typeName(), qPrintable(interface), mp.name());-
166 lastError = QDBusError(QDBusError::Failed,-
167 QString::fromLatin1("Unregistered type %1 cannot be handled")-
168 .arg(QLatin1String(mp.typeName())));-
169 return false;
never executed: return false;
0
170 }-
171 }
executed 196 times by 130 tests: end of block
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
  • ...
196
172-
173 // try to read this property-
174 QDBusMessage msg = QDBusMessage::createMethodCall(service, path,-
175 QDBusUtil::dbusInterfaceProperties(),-
176 QStringLiteral("Get"));
executed 196 times by 130 tests: return qstring_literal_temp;
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
  • ...
196
177 QDBusMessagePrivate::setParametersValidated(msg, true);-
178 msg << interface << QString::fromUtf8(mp.name());-
179 QDBusMessage reply = connection.call(msg, QDBus::Block, timeout);-
180-
181 if (reply.type() != QDBusMessage::ReplyMessage) {
reply.type() !...::ReplyMessageDescription
TRUEnever evaluated
FALSEevaluated 196 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
0-196
182 lastError = QDBusError(reply);-
183 return false;
never executed: return false;
0
184 }-
185 if (reply.signature() != QLatin1String("v")) {
reply.signatur...in1String("v")Description
TRUEnever evaluated
FALSEevaluated 196 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
0-196
186 QString errmsg = QLatin1String("Invalid signature `%1' in return from call to "-
187 DBUS_INTERFACE_PROPERTIES);-
188 lastError = QDBusError(QDBusError::InvalidSignature, qMove(errmsg).arg(reply.signature()));-
189 return false;
never executed: return false;
0
190 }-
191-
192 QByteArray foundSignature;-
193 const char *foundType = 0;-
194 QVariant value = qvariant_cast<QDBusVariant>(reply.arguments().at(0)).variant();-
195-
196 if (value.userType() == type || type == QMetaType::QVariant
value.userType() == typeDescription
TRUEevaluated 190 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
type == QMetaType::QVariantDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
0-190
197 || (expectedSignature[0] == 'v' && expectedSignature[1] == '\0')) {
expectedSignature[0] == 'v'Description
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
expectedSignature[1] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0-6
198 // simple match-
199 if (type == QMetaType::QVariant) {
type == QMetaType::QVariantDescription
TRUEnever evaluated
FALSEevaluated 190 times by 130 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDial
  • tst_QDialog
  • ...
0-190
200 *reinterpret_cast<QVariant*>(returnValuePtr) = value;-
201 } else {
never executed: end of block
0
202 QMetaType::destruct(type, returnValuePtr);-
203 QMetaType::construct(type, returnValuePtr, value.constData());-
204 }
executed 190 times by 130 tests: end of block
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
  • ...
190
205 return true;
executed 190 times by 130 tests: return true;
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
  • ...
190
206 }-
207-
208 if (value.userType() == qMetaTypeId<QDBusArgument>()) {
value.userType...BusArgument>()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEnever evaluated
0-6
209 QDBusArgument arg = qvariant_cast<QDBusArgument>(value);-
210-
211 foundType = "user type";-
212 foundSignature = arg.currentSignature().toLatin1();-
213 if (foundSignature == expectedSignature) {
foundSignature...ectedSignatureDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEnever evaluated
0-6
214 // signatures match, we can demarshall-
215 return QDBusMetaType::demarshall(arg, type, returnValuePtr);
executed 6 times by 2 tests: return QDBusMetaType::demarshall(arg, type, returnValuePtr);
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
6
216 }-
217 } else {
never executed: end of block
0
218 foundType = value.typeName();-
219 foundSignature = QDBusMetaType::typeToSignature(value.userType());-
220 }
never executed: end of block
0
221-
222 // there was an error...-
223 QString errmsg = QLatin1String("Unexpected `%1' (%2) when retrieving property `%3.%4' "-
224 "(expected type `%5' (%6))");-
225 lastError = QDBusError(QDBusError::InvalidSignature,-
226 errmsg.arg(QString::fromLatin1(foundType),-
227 QString::fromLatin1(foundSignature),-
228 interface,-
229 QString::fromUtf8(mp.name()),-
230 QString::fromLatin1(mp.typeName()),-
231 QString::fromLatin1(expectedSignature)));-
232 return false;
never executed: return false;
0
233}-
234-
235bool QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const QVariant &value)-
236{-
237 if (!isValid || !canMakeCalls()) // can't make calls
!isValidDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
!canMakeCalls()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
6-24
238 return false;
executed 14 times by 1 test: return false;
Executed by:
  • tst_qdbusabstractinterface - unknown status
14
239-
240 // send the value-
241 QDBusMessage msg = QDBusMessage::createMethodCall(service, path,-
242 QDBusUtil::dbusInterfaceProperties(),-
243 QStringLiteral("Set"));
executed 16 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
16
244 QDBusMessagePrivate::setParametersValidated(msg, true);-
245 msg << interface << QString::fromUtf8(mp.name()) << QVariant::fromValue(QDBusVariant(value));-
246 QDBusMessage reply = connection.call(msg, QDBus::Block, timeout);-
247-
248 if (reply.type() != QDBusMessage::ReplyMessage) {
reply.type() !...::ReplyMessageDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
0-16
249 lastError = QDBusError(reply);-
250 return false;
never executed: return false;
0
251 }-
252 return true;
executed 16 times by 2 tests: return true;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
16
253}-
254-
255void QDBusAbstractInterfacePrivate::_q_serviceOwnerChanged(const QString &name,-
256 const QString &oldOwner,-
257 const QString &newOwner)-
258{-
259 Q_UNUSED(oldOwner);-
260 Q_UNUSED(name);-
261 //qDebug() << "QDBusAbstractInterfacePrivate serviceOwnerChanged" << name << oldOwner << newOwner;-
262 Q_ASSERT(name == service);-
263 currentOwner = newOwner;-
264}
executed 2 times by 2 tests: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
2
265-
266QDBusAbstractInterfaceBase::QDBusAbstractInterfaceBase(QDBusAbstractInterfacePrivate &d, QObject *parent)-
267 : QObject(d, parent)-
268{-
269}
executed 1049 times by 160 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
1049
270-
271int QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call _c, int _id, void **_a)-
272{-
273 int saved_id = _id;-
274 _id = QObject::qt_metacall(_c, _id, _a);-
275 if (_id < 0)-
276 return _id;-
277-
278 if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty) {-
279 QMetaProperty mp = metaObject()->property(saved_id);-
280 int &status = *reinterpret_cast<int *>(_a[2]);-
281-
282 if (_c == QMetaObject::WriteProperty) {-
283 QVariant value;-
284 if (mp.userType() == qMetaTypeId<QDBusVariant>())-
285 value = reinterpret_cast<const QDBusVariant*>(_a[0])->variant();-
286 else-
287 value = QVariant(mp.userType(), _a[0]);-
288 status = d_func()->setProperty(mp, value) ? 1 : 0;-
289 } else {-
290 bool readStatus = d_func()->property(mp, _a[0]);-
291 // Caller supports QVariant returns? Then we can also report errors-
292 // by storing an invalid variant.-
293 if (!readStatus && _a[1]) {-
294 status = 0;-
295 reinterpret_cast<QVariant*>(_a[1])->clear();-
296 }-
297 }-
298 _id = -1;-
299 }-
300 return _id;-
301}-
302-
303/*!-
304 \class QDBusAbstractInterface-
305 \inmodule QtDBus-
306 \since 4.2-
307-
308 \brief The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the Qt D-Bus binding, allowing access to remote interfaces-
309-
310 Generated-code classes also derive from QDBusAbstractInterface,-
311 all methods described here are also valid for generated-code-
312 classes. In addition to those described here, generated-code-
313 classes provide member functions for the remote methods, which-
314 allow for compile-time checking of the correct parameters and-
315 return values, as well as property type-matching and signal-
316 parameter-matching.-
317-
318 \sa {qdbusxml2cpp.html}{The QDBus compiler}, QDBusInterface-
319*/-
320-
321/*!-
322 \internal-
323 This is the constructor called from QDBusInterface::QDBusInterface.-
324*/-
325QDBusAbstractInterface::QDBusAbstractInterface(QDBusAbstractInterfacePrivate &d, QObject *parent)-
326 : QDBusAbstractInterfaceBase(d, parent)-
327{-
328 d.initOwnerTracking();-
329}
executed 135 times by 12 tests: end of block
Executed by:
  • tst_QSystemTrayIcon
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
135
330-
331/*!-
332 \internal-
333 This is the constructor called from static classes derived from-
334 QDBusAbstractInterface (i.e., those generated by dbusxml2cpp).-
335*/-
336QDBusAbstractInterface::QDBusAbstractInterface(const QString &service, const QString &path,-
337 const char *interface, const QDBusConnection &con,-
338 QObject *parent)-
339 : QDBusAbstractInterfaceBase(*new QDBusAbstractInterfacePrivate(service, path, QString::fromLatin1(interface),-
340 con, false), parent)-
341{-
342 // keep track of the service owner-
343 d_func()->initOwnerTracking();-
344}
executed 914 times by 160 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
914
345-
346/*!-
347 Releases this object's resources.-
348*/-
349QDBusAbstractInterface::~QDBusAbstractInterface()-
350{-
351}-
352-
353/*!-
354 Returns \c true if this is a valid reference to a remote object. It returns \c false if-
355 there was an error during the creation of this interface (for instance, if the remote-
356 application does not exist).-
357-
358 Note: when dealing with remote objects, it is not always possible to determine if it-
359 exists when creating a QDBusInterface.-
360*/-
361bool QDBusAbstractInterface::isValid() const-
362{-
363 Q_D(const QDBusAbstractInterface);-
364 /* We don't retrieve the owner name for peer connections */-
365 if (d->connectionPrivate() && d->connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode) {
d->connectionPrivate()Description
TRUEevaluated 243 times by 27 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_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
d->connectionP...vate::PeerModeDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 236 times by 27 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_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
4-243
366 return d->isValid;
executed 7 times by 1 test: return d->isValid;
Executed by:
  • tst_qdbusabstractinterface - unknown status
7
367 } else {-
368 return !d->currentOwner.isEmpty();
executed 240 times by 27 tests: return !d->currentOwner.isEmpty();
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_QSystemTrayIcon
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • ...
240
369 }-
370}-
371-
372/*!-
373 Returns the connection this interface is associated with.-
374*/-
375QDBusConnection QDBusAbstractInterface::connection() const-
376{-
377 return d_func()->connection;
executed 1 time by 1 test: return d_func()->connection;
Executed by:
  • tst_qdbusabstractinterface - unknown status
1
378}-
379-
380/*!-
381 Returns the name of the service this interface is associated with.-
382*/-
383QString QDBusAbstractInterface::service() const-
384{-
385 return d_func()->service;
executed 888 times by 175 tests: return d_func()->service;
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
  • ...
888
386}-
387-
388/*!-
389 Returns the object path that this interface is associated with.-
390*/-
391QString QDBusAbstractInterface::path() const-
392{-
393 return d_func()->path;
executed 1050 times by 178 tests: return d_func()->path;
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
  • ...
1050
394}-
395-
396/*!-
397 Returns the name of this interface.-
398*/-
399QString QDBusAbstractInterface::interface() const-
400{-
401 return d_func()->interface;
executed 794 times by 157 tests: return d_func()->interface;
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
  • ...
794
402}-
403-
404/*!-
405 Returns the error the last operation produced, or an invalid error if the last operation did not-
406 produce an error.-
407*/-
408QDBusError QDBusAbstractInterface::lastError() const-
409{-
410 return d_func()->lastError;
executed 49 times by 1 test: return d_func()->lastError;
Executed by:
  • tst_qdbusabstractinterface - unknown status
49
411}-
412-
413/*!-
414 Sets the timeout in milliseconds for all future DBus calls to \a timeout.-
415 -1 means the default DBus timeout (usually 25 seconds).-
416-
417 \since 4.8-
418*/-
419void QDBusAbstractInterface::setTimeout(int timeout)-
420{-
421 d_func()->timeout = timeout;-
422}
executed 3 times by 1 test: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
3
423-
424/*!-
425 Returns the current value of the timeout in milliseconds.-
426 -1 means the default DBus timeout (usually 25 seconds).-
427-
428 \since 4.8-
429*/-
430int QDBusAbstractInterface::timeout() const-
431{-
432 return d_func()->timeout;
never executed: return d_func()->timeout;
0
433}-
434-
435/*!-
436 Places a call to the remote method specified by \a method on this interface, using \a args as-
437 arguments. This function returns the message that was received as a reply, which can be a normal-
438 QDBusMessage::ReplyMessage (indicating success) or QDBusMessage::ErrorMessage (if the call-
439 failed). The \a mode parameter specifies how this call should be placed.-
440-
441 If the call succeeds, lastError() will be cleared; otherwise, it will contain the error this-
442 call produced.-
443-
444 Normally, you should place calls using call().-
445-
446 \warning If you use \c UseEventLoop, your code must be prepared to deal with any reentrancy:-
447 other method calls and signals may be delivered before this function returns, as well-
448 as other Qt queued signals and events.-
449-
450 \threadsafe-
451*/-
452QDBusMessage QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode mode,-
453 const QString& method,-
454 const QList<QVariant>& args)-
455{-
456 Q_D(QDBusAbstractInterface);-
457-
458 if (!d->isValid || !d->canMakeCalls())
!d->isValidDescription
TRUEnever evaluated
FALSEevaluated 697 times by 156 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
!d->canMakeCalls()Description
TRUEnever evaluated
FALSEevaluated 697 times by 156 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
0-697
459 return QDBusMessage::createError(d->lastError);
never executed: return QDBusMessage::createError(d->lastError);
0
460-
461 QString m = method;-
462 // split out the signature from the method-
463 int pos = method.indexOf(QLatin1Char('.'));-
464 if (pos != -1)
pos != -1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 693 times by 156 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
4-693
465 m.truncate(pos);
executed 4 times by 1 test: m.truncate(pos);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
4
466-
467 if (mode == QDBus::AutoDetect) {
mode == QDBus::AutoDetectDescription
TRUEevaluated 369 times by 155 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 328 times by 23 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusreply - unknown status
328-369
468 // determine if this a sync or async call-
469 mode = QDBus::Block;-
470 const QMetaObject *mo = metaObject();-
471 QByteArray match = m.toLatin1();-
472-
473 for (int i = staticMetaObject.methodCount(); i < mo->methodCount(); ++i) {
i < mo->methodCount()Description
TRUEevaluated 5318 times by 155 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
FALSEevaluated 340 times by 153 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
340-5318
474 QMetaMethod mm = mo->method(i);-
475 if (mm.name() == match) {
mm.name() == matchDescription
TRUEevaluated 29 times by 5 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 5289 times by 155 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
29-5289
476 // found a method with the same name as what we're looking for-
477 // hopefully, nobody is overloading asynchronous and synchronous methods with-
478 // the same name-
479-
480 QList<QByteArray> tags = QByteArray(mm.tag()).split(' ');-
481 if (tags.contains("Q_NOREPLY"))
tags.contains("Q_NOREPLY")Description
TRUEnever evaluated
FALSEevaluated 29 times by 5 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusthreading - unknown status
0-29
482 mode = QDBus::NoBlock;
never executed: mode = QDBus::NoBlock;
0
483-
484 break;
executed 29 times by 5 tests: break;
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusthreading - unknown status
29
485 }-
486 }
executed 5289 times by 155 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
5289
487 }
executed 369 times by 155 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
369
488-
489// qDebug() << "QDBusAbstractInterface" << "Service" << service() << "Path:" << path();-
490 QDBusMessage msg = QDBusMessage::createMethodCall(service(), path(), interface(), m);-
491 QDBusMessagePrivate::setParametersValidated(msg, true);-
492 msg.setArguments(args);-
493-
494 QDBusMessage reply = d->connection.call(msg, mode, d->timeout);-
495 if (thread() == QThread::currentThread())
thread() == QT...urrentThread()Description
TRUEevaluated 411 times by 26 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • ...
FALSEevaluated 286 times by 153 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
286-411
496 d->lastError = QDBusError(reply); // will clear if reply isn't an error
executed 411 times by 26 tests: d->lastError = QDBusError(reply);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • ...
411
497-
498 // ensure that there is at least one element-
499 if (reply.arguments().isEmpty())
reply.arguments().isEmpty()Description
TRUEevaluated 93 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_qdbuscontext - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 604 times by 155 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • ...
93-604
500 reply << QVariant();
executed 93 times by 7 tests: reply << QVariant();
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_qdbusthreading - unknown status
93
501-
502 return reply;
executed 697 times by 156 tests: return reply;
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
  • ...
697
503}-
504-
505/*!-
506 \since 4.5-
507 Places a call to the remote method specified by \a method on this-
508 interface, using \a args as arguments. This function returns a-
509 QDBusPendingCall object that can be used to track the status of the-
510 reply and access its contents once it has arrived.-
511-
512 Normally, you should place calls using asyncCall().-
513-
514 \threadsafe-
515*/-
516QDBusPendingCall QDBusAbstractInterface::asyncCallWithArgumentList(const QString& method,-
517 const QList<QVariant>& args)-
518{-
519 Q_D(QDBusAbstractInterface);-
520-
521 if (!d->isValid || !d->canMakeCalls())
!d->isValidDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 99 times by 19 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_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
!d->canMakeCalls()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 91 times by 19 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_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
6-99
522 return QDBusPendingCall::fromError(d->lastError);
executed 14 times by 1 test: return QDBusPendingCall::fromError(d->lastError);
Executed by:
  • tst_qdbusabstractinterface - unknown status
14
523-
524 QDBusMessage msg = QDBusMessage::createMethodCall(service(), path(), interface(), method);-
525 QDBusMessagePrivate::setParametersValidated(msg, true);-
526 msg.setArguments(args);-
527 return d->connection.asyncCall(msg, d->timeout);
executed 91 times by 19 tests: return d->connection.asyncCall(msg, d->timeout);
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_qdbusabstractinterface - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
91
528}-
529-
530/*!-
531 Places a call to the remote method specified by \a method-
532 on this interface, using \a args as arguments. This function-
533 returns immediately after queueing the call. The reply from-
534 the remote function is delivered to the \a returnMethod on-
535 object \a receiver. If an error occurs, the \a errorMethod-
536 on object \a receiver is called instead.-
537-
538 This function returns \c true if the queueing succeeds. It does-
539 not indicate that the executed call succeeded. If it fails,-
540 the \a errorMethod is called. If the queueing failed, this-
541 function returns \c false and no slot will be called.-
542-
543 The \a returnMethod must have as its parameters the types returned-
544 by the function call. Optionally, it may have a QDBusMessage-
545 parameter as its last or only parameter. The \a errorMethod must-
546 have a QDBusError as its only parameter.-
547-
548 \since 4.3-
549 \sa QDBusError, QDBusMessage-
550 */-
551bool QDBusAbstractInterface::callWithCallback(const QString &method,-
552 const QList<QVariant> &args,-
553 QObject *receiver,-
554 const char *returnMethod,-
555 const char *errorMethod)-
556{-
557 Q_D(QDBusAbstractInterface);-
558-
559 if (!d->isValid || !d->canMakeCalls())
!d->isValidDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
!d->canMakeCalls()Description
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
0-6
560 return false;
never executed: return false;
0
561-
562 QDBusMessage msg = QDBusMessage::createMethodCall(service(),-
563 path(),-
564 interface(),-
565 method);-
566 QDBusMessagePrivate::setParametersValidated(msg, true);-
567 msg.setArguments(args);-
568-
569 d->lastError = QDBusError();-
570 return d->connection.callWithCallback(msg,
executed 6 times by 2 tests: return d->connection.callWithCallback(msg, receiver, returnMethod, errorMethod, d->timeout);
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
6
571 receiver,
executed 6 times by 2 tests: return d->connection.callWithCallback(msg, receiver, returnMethod, errorMethod, d->timeout);
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
6
572 returnMethod,
executed 6 times by 2 tests: return d->connection.callWithCallback(msg, receiver, returnMethod, errorMethod, d->timeout);
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
6
573 errorMethod,
executed 6 times by 2 tests: return d->connection.callWithCallback(msg, receiver, returnMethod, errorMethod, d->timeout);
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
6
574 d->timeout);
executed 6 times by 2 tests: return d->connection.callWithCallback(msg, receiver, returnMethod, errorMethod, d->timeout);
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
6
575}-
576-
577/*!-
578 \overload-
579-
580 This function is deprecated. Please use the overloaded version.-
581-
582 Places a call to the remote method specified by \a method-
583 on this interface, using \a args as arguments. This function-
584 returns immediately after queueing the call. The reply from-
585 the remote function or any errors emitted by it are delivered-
586 to the \a slot slot on object \a receiver.-
587-
588 This function returns \c true if the queueing succeeded: it does-
589 not indicate that the call succeeded. If it failed, the slot-
590 will be called with an error message. lastError() will not be-
591 set under those circumstances.-
592-
593 \sa QDBusError, QDBusMessage-
594*/-
595bool QDBusAbstractInterface::callWithCallback(const QString &method,-
596 const QList<QVariant> &args,-
597 QObject *receiver,-
598 const char *slot)-
599{-
600 return callWithCallback(method, args, receiver, slot, 0);
executed 5 times by 2 tests: return callWithCallback(method, args, receiver, slot, 0);
Executed by:
  • tst_qdbuspendingcall - unknown status
  • tst_qdbusthreading - unknown status
5
601}-
602-
603/*!-
604 \internal-
605 Catch signal connections.-
606*/-
607void QDBusAbstractInterface::connectNotify(const QMetaMethod &signal)-
608{-
609 // someone connecting to one of our signals-
610 Q_D(QDBusAbstractInterface);-
611 if (!d->isValid)
!d->isValidDescription
TRUEnever evaluated
FALSEevaluated 387 times by 19 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_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
0-387
612 return;
never executed: return;
0
613-
614 // we end up recursing here, so optimize away-
615 static const QMetaMethod destroyedSignal = QMetaMethod::fromSignal(&QDBusAbstractInterface::destroyed);-
616 if (signal == destroyedSignal)
signal == destroyedSignalDescription
TRUEevaluated 200 times by 19 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_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 187 times by 19 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_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
187-200
617 return;
executed 200 times by 19 tests: return;
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_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
200
618-
619 QDBusConnectionPrivate *conn = d->connectionPrivate();-
620 if (conn) {
connDescription
TRUEevaluated 187 times by 19 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_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
FALSEnever evaluated
0-187
621 conn->connectRelay(d->service, d->path, d->interface,-
622 this, signal);-
623 }
executed 187 times by 19 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
187
624}
executed 187 times by 19 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
187
625-
626/*!-
627 \internal-
628 Catch signal disconnections.-
629*/-
630void QDBusAbstractInterface::disconnectNotify(const QMetaMethod &signal)-
631{-
632 // someone disconnecting from one of our signals-
633 Q_D(QDBusAbstractInterface);-
634 if (!d->isValid)
!d->isValidDescription
TRUEnever evaluated
FALSEevaluated 102 times by 21 tests
Evaluated by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
0-102
635 return;
never executed: return;
0
636-
637 // disconnection is just resource freeing, so it can be delayed;-
638 // let's do that later, after all the QObject mutexes have been unlocked.-
639 QCoreApplication::postEvent(this, new DisconnectRelayEvent(this, signal));-
640}
executed 102 times by 21 tests: end of block
Executed by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
102
641-
642/*!-
643 \internal-
644 Continues the disconnect notification from above.-
645*/-
646void QDBusAbstractInterfacePrivate::finishDisconnectNotify(QDBusAbstractInterface *ptr, int signalId)-
647{-
648 QDBusAbstractInterfacePrivate *d = ptr->d_func();-
649 QDBusConnectionPrivate *conn = d->connectionPrivate();-
650 if (!conn)
!connDescription
TRUEnever evaluated
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
0-15
651 return;
never executed: return;
0
652-
653 const QMetaObject *mo = ptr->metaObject();-
654 QMetaMethod signal = signalId >= 0 ? mo->method(signalId) : QMetaMethod();
signalId >= 0Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
4-11
655 if (signal.isValid()) {
signal.isValid()Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
4-11
656 if (!ptr->isSignalConnected(signal))
!ptr->isSignal...nected(signal)Description
TRUEnever evaluated
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
0-11
657 return conn->disconnectRelay(d->service, d->path, d->interface,
never executed: return conn->disconnectRelay(d->service, d->path, d->interface, ptr, signal);
0
658 ptr, signal);
never executed: return conn->disconnectRelay(d->service, d->path, d->interface, ptr, signal);
0
659 } else {
executed 11 times by 2 tests: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
11
660 // wildcard disconnecting, we need to figure out which of our signals are-
661 // no longer connected to anything-
662 int midx = QObject::staticMetaObject.methodCount();-
663 const int end = mo->methodCount();-
664 for ( ; midx < end; ++midx) {
midx < endDescription
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
4-40
665 QMetaMethod mm = mo->method(midx);-
666 if (mm.methodType() == QMetaMethod::Signal && !ptr->isSignalConnected(mm))
mm.methodType(...Method::SignalDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
!ptr->isSignalConnected(mm)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qdbusabstractinterface - unknown status
4-28
667 conn->disconnectRelay(d->service, d->path, d->interface, ptr, mm);
executed 8 times by 1 test: conn->disconnectRelay(d->service, d->path, d->interface, ptr, mm);
Executed by:
  • tst_qdbusabstractinterface - unknown status
8
668 }
executed 40 times by 1 test: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
40
669 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qdbusabstractinterface - unknown status
4
670}-
671-
672/*!-
673 \internal-
674 Get the value of the property \a propname.-
675*/-
676QVariant QDBusAbstractInterface::internalPropGet(const char *propname) const-
677{-
678 // assume this property exists and is readable-
679 // we're only called from generated code anyways-
680-
681 return property(propname);
never executed: return property(propname);
0
682}-
683-
684/*!-
685 \internal-
686 Set the value of the property \a propname to \a value.-
687*/-
688void QDBusAbstractInterface::internalPropSet(const char *propname, const QVariant &value)-
689{-
690 setProperty(propname, value);-
691}
never executed: end of block
0
692-
693/*!-
694 Calls the method \a method on this interface and passes the parameters to this function to the-
695 method.-
696-
697 The parameters to \c call are passed on to the remote function via D-Bus as input-
698 arguments. Output arguments are returned in the QDBusMessage reply. If the reply is an error-
699 reply, lastError() will also be set to the contents of the error message.-
700-
701 This function can be used with up to 8 parameters, passed in arguments \a arg1, \a arg2,-
702 \a arg3, \a arg4, \a arg5, \a arg6, \a arg7 and \a arg8. If you need more than 8-
703 parameters or if you have a variable number of parameters to be passed, use-
704 callWithArgumentList().-
705-
706 It can be used the following way:-
707-
708 \snippet code/src_qdbus_qdbusabstractinterface.cpp 0-
709-
710 This example illustrates function calling with 0, 1 and 2 parameters and illustrates different-
711 parameter types passed in each (the first call to \c "ProcessWorkUnicode" will contain one-
712 Unicode string, the second call to \c "ProcessWork" will contain one string and one byte array).-
713*/-
714QDBusMessage QDBusAbstractInterface::call(const QString &method, const QVariant &arg1,-
715 const QVariant &arg2,-
716 const QVariant &arg3,-
717 const QVariant &arg4,-
718 const QVariant &arg5,-
719 const QVariant &arg6,-
720 const QVariant &arg7,-
721 const QVariant &arg8)-
722{-
723 return call(QDBus::AutoDetect, method, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
executed 127 times by 28 tests: return call(QDBus::AutoDetect, method, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
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_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
127
724}-
725-
726/*!-
727 \overload-
728-
729 Calls the method \a method on this interface and passes the-
730 parameters to this function to the method. If \a mode is \c-
731 NoWaitForReply, then this function will return immediately after-
732 placing the call, without waiting for a reply from the remote-
733 method. Otherwise, \a mode indicates whether this function should-
734 activate the Qt Event Loop while waiting for the reply to arrive.-
735-
736 This function can be used with up to 8 parameters, passed in arguments \a arg1, \a arg2,-
737 \a arg3, \a arg4, \a arg5, \a arg6, \a arg7 and \a arg8. If you need more than 8-
738 parameters or if you have a variable number of parameters to be passed, use-
739 callWithArgumentList().-
740-
741 If this function reenters the Qt event loop in order to wait for the-
742 reply, it will exclude user input. During the wait, it may deliver-
743 signals and other method calls to your application. Therefore, it-
744 must be prepared to handle a reentrancy whenever a call is placed-
745 with call().-
746*/-
747QDBusMessage QDBusAbstractInterface::call(QDBus::CallMode mode, const QString &method,-
748 const QVariant &arg1,-
749 const QVariant &arg2,-
750 const QVariant &arg3,-
751 const QVariant &arg4,-
752 const QVariant &arg5,-
753 const QVariant &arg6,-
754 const QVariant &arg7,-
755 const QVariant &arg8)-
756{-
757 QList<QVariant> argList;-
758 int count = 0 + arg1.isValid() + arg2.isValid() + arg3.isValid() + arg4.isValid() +-
759 arg5.isValid() + arg6.isValid() + arg7.isValid() + arg8.isValid();-
760-
761 switch (count) {-
762 case 8:
never executed: case 8:
0
763 argList.prepend(arg8);-
764 // fall through-
765 case 7:
code before this statement never executed: case 7:
never executed: case 7:
0
766 argList.prepend(arg7);-
767 // fall through-
768 case 6:
code before this statement never executed: case 6:
never executed: case 6:
0
769 argList.prepend(arg6);-
770 // fall through-
771 case 5:
code before this statement never executed: case 5:
never executed: case 5:
0
772 argList.prepend(arg5);-
773 // fall through-
774 case 4:
code before this statement never executed: case 4:
never executed: case 4:
0
775 argList.prepend(arg4);-
776 // fall through-
777 case 3:
code before this statement never executed: case 3:
executed 12 times by 1 test: case 3:
Executed by:
  • tst_qdbusabstractadaptor - unknown status
0-12
778 argList.prepend(arg3);-
779 // fall through-
780 case 2:
code before this statement executed 12 times by 1 test: case 2:
Executed by:
  • tst_qdbusabstractadaptor - unknown status
executed 59 times by 9 tests: case 2:
Executed by:
  • 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_qdbusservicewatcher - unknown status
12-59
781 argList.prepend(arg2);-
782 // fall through-
783 case 1:
code before this statement executed 71 times by 9 tests: case 1:
Executed by:
  • 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_qdbusservicewatcher - unknown status
executed 118 times by 9 tests: case 1:
Executed by:
  • 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_qdbusservicewatcher - unknown status
71-118
784 argList.prepend(arg1);-
785 }
executed 118 times by 9 tests: end of block
Executed by:
  • 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_qdbusservicewatcher - unknown status
118
786-
787 return callWithArgumentList(mode, method, argList);
executed 311 times by 29 tests: return callWithArgumentList(mode, method, argList);
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_qdbuscontext - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
311
788}-
789-
790-
791/*!-
792 \since 4.5-
793 Calls the method \a method on this interface and passes the parameters to this function to the-
794 method.-
795-
796 The parameters to \c call are passed on to the remote function via D-Bus as input-
797 arguments. The returned QDBusPendingCall object can be used to find out information about-
798 the reply.-
799-
800 This function can be used with up to 8 parameters, passed in arguments \a arg1, \a arg2,-
801 \a arg3, \a arg4, \a arg5, \a arg6, \a arg7 and \a arg8. If you need more than 8-
802 parameters or if you have a variable number of parameters to be passed, use-
803 asyncCallWithArgumentList().-
804-
805 It can be used the following way:-
806-
807 \snippet code/src_qdbus_qdbusabstractinterface.cpp 1-
808-
809 This example illustrates function calling with 0, 1 and 2 parameters and illustrates different-
810 parameter types passed in each (the first call to \c "ProcessWorkUnicode" will contain one-
811 Unicode string, the second call to \c "ProcessWork" will contain one string and one byte array).-
812*/-
813QDBusPendingCall QDBusAbstractInterface::asyncCall(const QString &method, const QVariant &arg1,-
814 const QVariant &arg2,-
815 const QVariant &arg3,-
816 const QVariant &arg4,-
817 const QVariant &arg5,-
818 const QVariant &arg6,-
819 const QVariant &arg7,-
820 const QVariant &arg8)-
821{-
822 QList<QVariant> argList;-
823 int count = 0 + arg1.isValid() + arg2.isValid() + arg3.isValid() + arg4.isValid() +-
824 arg5.isValid() + arg6.isValid() + arg7.isValid() + arg8.isValid();-
825-
826 switch (count) {-
827 case 8:
never executed: case 8:
0
828 argList.prepend(arg8);-
829 // fall through-
830 case 7:
code before this statement never executed: case 7:
never executed: case 7:
0
831 argList.prepend(arg7);-
832 // fall through-
833 case 6:
code before this statement never executed: case 6:
never executed: case 6:
0
834 argList.prepend(arg6);-
835 // fall through-
836 case 5:
code before this statement never executed: case 5:
never executed: case 5:
0
837 argList.prepend(arg5);-
838 // fall through-
839 case 4:
code before this statement never executed: case 4:
never executed: case 4:
0
840 argList.prepend(arg4);-
841 // fall through-
842 case 3:
code before this statement never executed: case 3:
never executed: case 3:
0
843 argList.prepend(arg3);-
844 // fall through-
845 case 2:
code before this statement never executed: case 2:
never executed: case 2:
0
846 argList.prepend(arg2);-
847 // fall through-
848 case 1:
code before this statement never executed: case 1:
never executed: case 1:
0
849 argList.prepend(arg1);-
850 }
never executed: end of block
0
851-
852 return asyncCallWithArgumentList(method, argList);
executed 39 times by 2 tests: return asyncCallWithArgumentList(method, argList);
Executed by:
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
39
853}-
854-
855/*!-
856 \internal-
857*/-
858QDBusMessage QDBusAbstractInterface::internalConstCall(QDBus::CallMode mode,-
859 const QString &method,-
860 const QList<QVariant> &args) const-
861{-
862 // ### move the code here, and make the other functions call this-
863 return const_cast<QDBusAbstractInterface*>(this)->callWithArgumentList(mode, method, args);
executed 242 times by 150 tests: return const_cast<QDBusAbstractInterface*>(this)->callWithArgumentList(mode, method, args);
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
  • ...
242
864}-
865-
866QT_END_NAMESPACE-
867-
868#endif // QT_NO_DBUS-
869-
870#include "moc_qdbusabstractinterface.cpp"-
Source codeSwitch to Preprocessed file

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