Files
qt5-legatus-legacy/Lts/Common/LtsUtils/LtsUtilsCore/scoped_connection.cpp
T
2026-08-13 18:33:10 +02:00

29 lines
474 B
C++
Executable File

/**
* @RDE_HEADER@
* ScopedConnection
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Fröbel, SLSE, 2017-07-24
*/
#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();
}
} // namespace LtsUtils