Connection guard, only valid signal connections will be added

This commit is contained in:
Klaus Basan
2018-07-16 15:49:59 +02:00
parent 3bfb76c1e6
commit a7947d3c87
2 changed files with 14 additions and 6 deletions

View File

@@ -50,10 +50,10 @@ namespace BlackMisc
~CConnectionGuard();
//! Add connection
void append(const QMetaObject::Connection &connection);
bool append(const QMetaObject::Connection &connection);
//! Add connections
void append(const QList<QMetaObject::Connection> &connections);
bool append(const QList<QMetaObject::Connection> &connections);
//! Disconnect all
int disconnectAll();
@@ -61,6 +61,6 @@ namespace BlackMisc
private:
QList<QMetaObject::Connection> m_connections;
};
} // BlackMisc
} // ns
#endif