Logo Search packages:      
Sourcecode: kdbus version File versions  Download package

QDBusConnection & QDBusConnection::operator= ( const QDBusConnection other  ) 

Creates a shallow copy of the given connection.

Allows to pass connection handles around by value, similar to QString thus avoiding problems like dangling pointers in application code

other the connection to copy from
a reference to this instance as required by assigment operator semantics

Definition at line 166 of file qdbusconnection.cpp.

References d.

    if (other.d)
    QDBusConnectionPrivate *old = static_cast<QDBusConnectionPrivate *>(
            q_atomic_set_ptr(&d, other.d));*/
    QDBusConnectionPrivate* old = d;
    d = other.d;
    if (old && !old->ref.deref())
        delete old;

    return *this;

Generated by  Doxygen 1.6.0   Back to index