util: add isConnected() in signal::Connection and signal::ScopedConnection
Change-Id: Iddf2a084ccf137a691cd85c54003182acf0e5afd
Refs: #2308
diff --git a/src/util/signal-scoped-connection.hpp b/src/util/signal-scoped-connection.hpp
index 9104791..80717e5 100644
--- a/src/util/signal-scoped-connection.hpp
+++ b/src/util/signal-scoped-connection.hpp
@@ -61,6 +61,13 @@
void
disconnect();
+ /** \brief check if the connection is connected to the signal
+ * \return false when a default-constructed connection is used, the connection is released,
+ * or the connection is disconnected
+ */
+ bool
+ isConnected() const;
+
/** \brief releases the connection so that it won't be disconnected
* when this ScopedConnection is destructed
*/