18#ifndef QGSSCOPEDCONNECTION_H
19#define QGSSCOPEDCONNECTION_H
44 : mConnection( std::move( connection ) )
60 : mConnection( std::move( other.mConnection ) )
62 other.mConnection = QMetaObject::Connection();
70 mConnection = std::move( other.mConnection );
71 other.mConnection = QMetaObject::Connection();
79 mConnection = std::move( connection );
90 QObject::disconnect( mConnection );
91 mConnection = QMetaObject::Connection();
96 QMetaObject::Connection mConnection;
void disconnect()
Manually disconnects the managed connection.
QgsScopedConnection()=default
Default constructor (holds an invalid connection).
QgsScopedConnection & operator=(QgsScopedConnection &&other) noexcept
QgsScopedConnection & operator=(const QgsScopedConnection &)=delete
QgsScopedConnection & operator=(QMetaObject::Connection connection)
QgsScopedConnection(QgsScopedConnection &&other) noexcept
Move constructor.
QgsScopedConnection(const QgsScopedConnection &)=delete
QgsScopedConnection(QMetaObject::Connection connection)
Constructor for QgsScopedConnection, managing the specified connection.
~QgsScopedConnection()
Destructor for QgsScopedConnection.