Skip to content

Commit

Permalink
Fix some warnings and whitespace errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chriadam committed Aug 16, 2023
1 parent b8b4be2 commit e18d682
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/qt/ve_qitems_mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//--

VeQItemMqtt::VeQItemMqtt(VeQItemMqttProducer *producer)
: VeQItem(producer, nullptr)
: VeQItem(producer)
{
connect(producer, &VeQItemMqttProducer::connectionStateChanged,
this, [this] {
Expand Down Expand Up @@ -39,15 +39,15 @@ int VeQItemMqtt::setValue(QVariant const &value)

QVariant VeQItemMqtt::getValue()
{
return getValue(false);
return getValue(false);
}

QVariant VeQItemMqtt::getValue(bool force)
{
if (force && mqttProducer()) {
mqttProducer()->requestValue(uniqueId());
}
return VeQItem::getValue(force);
if (force && mqttProducer()) {
mqttProducer()->requestValue(uniqueId());
}
return VeQItem::getValue(force);
}

// This is called by VeQItem::itemAddChild().
Expand Down Expand Up @@ -95,7 +95,7 @@ VeQItemMqttProducer::VeQItemMqttProducer(

mKeepAliveTimer->setInterval(1000 * 30);
connect(mKeepAliveTimer, &QTimer::timeout,
[this] {
this, [this] {
doKeepAlive(/* suppressRepublish = */ true);
});
// start the timer once we have sent the first (empty) keepalive after subscribing.
Expand Down Expand Up @@ -176,7 +176,7 @@ void VeQItemMqttProducer::open(
this, [this, protocolVersion] {
mMqttConnection->setProtocolVersion(protocolVersion);
mMqttConnection->setTransport(mWebSocket, QMqttClient::IODevice);
QMetaObject::invokeMethod(this, [this] { aboutToConnect(); }, Qt::QueuedConnection);
QMetaObject::invokeMethod(this, [this] { Q_EMIT aboutToConnect(); }, Qt::QueuedConnection);
});

setConnectionState(Connecting);
Expand Down Expand Up @@ -218,7 +218,7 @@ void VeQItemMqttProducer::open(const QHostAddress &host, int port)
connect(mMqttConnection, &QMqttClient::messageReceived,
this, &VeQItemMqttProducer::onMessageReceived);

QMetaObject::invokeMethod(this, [this] { aboutToConnect(); }, Qt::QueuedConnection);
QMetaObject::invokeMethod(this, [this] { Q_EMIT aboutToConnect(); }, Qt::QueuedConnection);
setConnectionState(Connecting);
}, Qt::QueuedConnection);
}
Expand Down

0 comments on commit e18d682

Please sign in to comment.