Qt 4.8
Public Functions | Static Public Functions | Public Variables | List of all members
QDBusContextPrivate Class Reference

#include <qdbuscontext_p.h>

Public Functions

 QDBusContextPrivate (const QDBusConnection &conn, const QDBusMessage &msg)
 

Static Public Functions

static QDBusContextPrivateset (QObject *obj, QDBusContextPrivate *newContext)
 

Public Variables

QDBusConnection connection
 
const QDBusMessagemessage
 

Detailed Description

Definition at line 67 of file qdbuscontext_p.h.

Constructors and Destructors

◆ QDBusContextPrivate()

QDBusContextPrivate::QDBusContextPrivate ( const QDBusConnection conn,
const QDBusMessage msg 
)
inline

Definition at line 70 of file qdbuscontext_p.h.

71  : connection(conn), message(msg) {}
QDBusConnection connection
const QDBusMessage & message

Functions

◆ set()

QDBusContextPrivate * QDBusContextPrivate::set ( QObject obj,
QDBusContextPrivate newContext 
)
static

Definition at line 53 of file qdbuscontext.cpp.

Referenced by QDBusConnectionPrivate::deliverCall().

54 {
55  // determine if this is an adaptor or not
56  if (qobject_cast<QDBusAbstractAdaptor *>(obj))
57  obj = obj->parent();
58 
59  Q_ASSERT(obj);
60 
61  void *ptr = obj->qt_metacast("QDBusContext");
62  QDBusContext *q_ptr = reinterpret_cast<QDBusContext *>(ptr);
63  if (q_ptr) {
64  QDBusContextPrivate *old = q_ptr->d_ptr;
65  q_ptr->d_ptr = newContext;
66  return old;
67  }
68 
69  return 0;
70 }
The QDBusContext class allows slots to determine the D-Bus context of the calls.
Definition: qdbuscontext.h:60
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
const T * ptr(const T &t)
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
QDBusContextPrivate * d_ptr
Definition: qdbuscontext.h:78

Properties

◆ connection

QDBusConnection QDBusContextPrivate::connection

Definition at line 73 of file qdbuscontext_p.h.

Referenced by QDBusContext::connection().

◆ message

const QDBusMessage& QDBusContextPrivate::message

Definition at line 74 of file qdbuscontext_p.h.

Referenced by QDBusContext::message().


The documentation for this class was generated from the following files: