Skip to content

Commit

Permalink
webaccess: fix usage of widget ID
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Dec 21, 2024
1 parent 1bd5524 commit 46f4109
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webaccess/src/webaccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,9 @@ void WebAccess::slotHandleWebSocketRequest(QHttpConnection *conn, QString data)
quint32 wID = cmdList[2].toUInt();
VCWidget *widget = m_vc->widget(wID);
if (widget != NULL)
wsAPIMessage.append(QString("%1|%2").arg(widget->id()).arg(widget->typeToString(widget->type())));
wsAPIMessage.append(QString("%1|%2").arg(wID).arg(widget->typeToString(widget->type())));
else
wsAPIMessage.append(QString("%1|%2").arg(widget->id()).arg(widget->typeToString(VCWidget::UnknownWidget)));
wsAPIMessage.append(QString("%1|%2").arg(wID).arg(widget->typeToString(VCWidget::UnknownWidget)));
}
else if (apiCmd == "getWidgetStatus")
{
Expand All @@ -636,7 +636,7 @@ void WebAccess::slotHandleWebSocketRequest(QHttpConnection *conn, QString data)
if (widget != NULL)
{
// add widget ID to the response
wsAPIMessage.append(QString("%1|").arg(widget->id()));
wsAPIMessage.append(QString("%1|").arg(wID));

switch(widget->type())
{
Expand Down

0 comments on commit 46f4109

Please sign in to comment.