16 if (!connection) {
return false; }
17 m_connections.append(connection);
24 for (
const QMetaObject::Connection &connection : connections)
26 if (!connection) {
continue; }
27 if (this->
append(connection)) { c++; }
36 if (m_connections.isEmpty()) {
return 0; }
38 for (
const QMetaObject::Connection &con : std::as_const(m_connections))
40 if (QObject::disconnect(con)) { c++; }
42 m_connections.clear();
CConnectionGuard()=default
Constructor.
~CConnectionGuard()
Destructor.
bool append(const QMetaObject::Connection &connection)
Add connection.
int disconnectAll()
Disconnect all.
Free functions in swift::misc.