23 lines
321 B
C++
Executable File
23 lines
321 B
C++
Executable File
|
|
|
|
|
|
#include "scoped_connection.h"
|
|
#include "connection.h"
|
|
|
|
namespace LtsUtils
|
|
{
|
|
|
|
ScopedConnection::ScopedConnection(IConnection *connection, Qt::ConnectionType connType)
|
|
: m_conn(connection)
|
|
{
|
|
Q_ASSERT(connection);
|
|
m_conn->connect(connType);
|
|
}
|
|
|
|
ScopedConnection::~ScopedConnection()
|
|
{
|
|
m_conn->disconnect();
|
|
}
|
|
|
|
}
|