swift
|
List of QMetaObject::Connection. More...
Public Member Functions | |
CConnectionGuard ()=default | |
Constructor. | |
CConnectionGuard (const QMetaObject::Connection &connection) | |
Constructor. | |
CConnectionGuard (CConnectionGuard &&)=default | |
Move constructor. | |
CConnectionGuard & | operator= (CConnectionGuard &&)=default |
Move assignment operator. | |
~CConnectionGuard () | |
Destructor. | |
bool | append (const QMetaObject::Connection &connection) |
Add connection. | |
bool | append (const QList< QMetaObject::Connection > &connections) |
Add connections. | |
int | disconnectAll () |
Disconnect all. | |
bool | isEmpty () const |
Empty. | |
CConnectionGuard (const CConnectionGuard &)=delete | |
Not copyable. | |
CConnectionGuard & | operator= (const CConnectionGuard &)=delete |
Not copyable. | |
List of QMetaObject::Connection.
The trick here is that those connections will be disconnected when the object is destroyed. So it can be used with lambdas or bind which feature non QObjects, if those might be destroyed before the signaling QObject.
Definition at line 21 of file connectionguard.h.