- Qt 5.15
- Qt D-Bus
- C++ Classes
- QDBusConnection
- Qt 5.15.15 Reference Documentation

# Obsolete Members for QDBusConnection

The following members of class QDBusConnection are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(obsolete)` bool | callWithCallback(const QDBusMessage &message, QObject *receiver, const char *returnMethod, int timeout = -1) const

## Static Public Members

`(obsolete)` QDBusConnection | sender()

## Member Function Documentation

### bool QDBusConnection::callWithCallback(const QDBusMessage &message, QObject *receiver, const char *returnMethod, int timeout = -1) const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This is an overloaded function.

Sends the message over this connection and returns immediately. When the reply is received, the method returnMethod is called in the receiver object.

This function is suitable for method calls only. It is guaranteed that the slot will be called exactly once with the reply, as long as the parameter types match and no error occurs.

This function is dangerous because it cannot report errors, including the expiration of the timeout.

Returns `true` if the message was sent, or false if the message could not be sent.

### `[static]` QDBusConnection QDBusConnection::sender()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Always returns a disconnected, invalid QDBusConnection object. For the old functionality of determining the sender connection, please use QDBusContext.

See also QDBusContext.