swift
Public Member Functions | List of all members
swift::misc::CConnectionGuard Class Reference

List of QMetaObject::Connection. More...

Public Member Functions

 CConnectionGuard ()=default
 Constructor.
 
 CConnectionGuard (const QMetaObject::Connection &connection)
 Constructor.
 
 CConnectionGuard (CConnectionGuard &&)=default
 Move constructor.
 
CConnectionGuardoperator= (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.
 
CConnectionGuardoperator= (const CConnectionGuard &)=delete
 Not copyable.
 

Detailed Description

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.


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