| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbuscontext.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate *newContext) | - | ||||||
| 8 | { | - | ||||||
| 9 | - | |||||||
| 10 | if (qobject_cast<QDBusAbstractAdaptor *>(obj)
| 302-3536 | ||||||
| 11 | obj = obj->parent(); executed 302 times by 5 tests: obj = obj->parent();Executed by:
| 302 | ||||||
| 12 | - | |||||||
| 13 | ((!(obj)) ? qt_assert("obj",__FILE__,57) : qt_noop()); | - | ||||||
| 14 | - | |||||||
| 15 | void *ptr = obj->qt_metacast("QDBusContext"); | - | ||||||
| 16 | QDBusContext *q_ptr = reinterpret_cast<QDBusContext *>(ptr); | - | ||||||
| 17 | if (q_ptr
| 1044-2794 | ||||||
| 18 | QDBusContextPrivate *old = q_ptr->d_ptr; | - | ||||||
| 19 | q_ptr->d_ptr = newContext; | - | ||||||
| 20 | return executed 1044 times by 4 tests: old;return old;Executed by:
executed 1044 times by 4 tests: return old;Executed by:
| 1044 | ||||||
| 21 | } | - | ||||||
| 22 | - | |||||||
| 23 | return executed 2794 times by 158 tests: 0;return 0;Executed by:
executed 2794 times by 158 tests: return 0;Executed by:
| 2794 | ||||||
| 24 | } | - | ||||||
| 25 | QDBusContext::QDBusContext() | - | ||||||
| 26 | : d_ptr(0) | - | ||||||
| 27 | { | - | ||||||
| 28 | } executed 6 times by 4 tests: end of blockExecuted by:
| 6 | ||||||
| 29 | - | |||||||
| 30 | - | |||||||
| 31 | - | |||||||
| 32 | - | |||||||
| 33 | QDBusContext::~QDBusContext() | - | ||||||
| 34 | { | - | ||||||
| 35 | } | - | ||||||
| 36 | bool QDBusContext::calledFromDBus() const | - | ||||||
| 37 | { | - | ||||||
| 38 | return executed 20 times by 1 test: d_ptr;return d_ptr;Executed by:
executed 20 times by 1 test: return d_ptr;Executed by:
| 20 | ||||||
| 39 | } | - | ||||||
| 40 | - | |||||||
| 41 | - | |||||||
| 42 | - | |||||||
| 43 | - | |||||||
| 44 | QDBusConnection QDBusContext::connection() const | - | ||||||
| 45 | { | - | ||||||
| 46 | return executed 21 times by 2 tests: d_ptr->connection;return d_ptr->connection;Executed by:
executed 21 times by 2 tests: return d_ptr->connection;Executed by:
| 21 | ||||||
| 47 | } | - | ||||||
| 48 | - | |||||||
| 49 | - | |||||||
| 50 | - | |||||||
| 51 | - | |||||||
| 52 | const QDBusMessage &QDBusContext::message() const | - | ||||||
| 53 | { | - | ||||||
| 54 | return executed 84 times by 3 tests: d_ptr->message;return d_ptr->message;Executed by:
executed 84 times by 3 tests: return d_ptr->message;Executed by:
| 84 | ||||||
| 55 | } | - | ||||||
| 56 | - | |||||||
| 57 | - | |||||||
| 58 | - | |||||||
| 59 | - | |||||||
| 60 | - | |||||||
| 61 | - | |||||||
| 62 | bool QDBusContext::isDelayedReply() const | - | ||||||
| 63 | { | - | ||||||
| 64 | return never executed: message().isDelayedReply();return message().isDelayedReply();never executed: return message().isDelayedReply(); | 0 | ||||||
| 65 | } | - | ||||||
| 66 | void QDBusContext::setDelayedReply(bool enable) const | - | ||||||
| 67 | { | - | ||||||
| 68 | message().setDelayedReply(enable); | - | ||||||
| 69 | } executed 42 times by 3 tests: end of blockExecuted by:
| 42 | ||||||
| 70 | void QDBusContext::sendErrorReply(const QString &name, const QString &msg) const | - | ||||||
| 71 | { | - | ||||||
| 72 | setDelayedReply(true); | - | ||||||
| 73 | connection().send(message().createErrorReply(name, msg)); | - | ||||||
| 74 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||
| 75 | void QDBusContext::sendErrorReply(QDBusError::ErrorType type, const QString &msg) const | - | ||||||
| 76 | { | - | ||||||
| 77 | setDelayedReply(true); | - | ||||||
| 78 | connection().send(message().createErrorReply(type, msg)); | - | ||||||
| 79 | } never executed: end of block | 0 | ||||||
| 80 | - | |||||||
| 81 | - | |||||||
| Switch to Source code | Preprocessed file |