Simplify MessageClient constructor

Don’t pass arguments that we don’t use.
This commit is contained in:
Allan Bazinet
2024-11-02 09:21:43 -07:00
parent 5df58e6f00
commit 7a09fc698a
3 changed files with 12 additions and 30 deletions

View File

@@ -35,15 +35,9 @@ public:
// Constructor
impl(QString const & id,
QString const & version,
QString const & revision,
port_type const server_port,
MessageClient * self)
impl(port_type const server_port,
MessageClient * self)
: self_ {self}
, id_ {id}
, version_ {version}
, revision_ {revision}
, server_port_ {server_port}
, heartbeat_timer_ {new QTimer {this}}
{
@@ -274,18 +268,11 @@ public:
#include "MessageClient.moc"
MessageClient::MessageClient(QString const & id,
QString const & version,
QString const & revision,
QString const & server,
MessageClient::MessageClient(QString const & server,
port_type const server_port,
QObject * self)
: QObject {self}
, m_ {id,
version,
revision,
server_port,
this}
, m_ {server_port, this}
{
connect(&*m_, &impl::errorOccurred,[this](impl::SocketError e)
{