Skip to content

Commit

Permalink
fix: active connection info of device may not set
Browse files Browse the repository at this point in the history
Change-Id: I661b31fcda3492634909f1f269b670d460a3ed90
  • Loading branch information
listenerri committed Nov 9, 2018
1 parent 4837c9d commit bddcad5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ WirelessTrayWidget::WirelessTrayWidget(WirelessDevice *device, QWidget *parent)
m_wirelessPopup->setObjectName("wireless-" + m_device->path());
m_wirelessPopup->setVisible(false);

connect(m_device, static_cast<void (NetworkDevice::*) (const QString &statStr) const>(&NetworkDevice::statusChanged), m_refershTimer, static_cast<void (QTimer::*) ()>(&QTimer::start));
connect(static_cast<WirelessDevice *>(m_device), &WirelessDevice::activeApInfoChanged, m_refershTimer, static_cast<void (QTimer::*) ()>(&QTimer::start));
connect(static_cast<WirelessDevice *>(m_device), &WirelessDevice::activeConnectionChanged, m_refershTimer, static_cast<void (QTimer::*) ()>(&QTimer::start));
connect(m_refershTimer, &QTimer::timeout, [=] {
WirelessDevice *dev = static_cast<WirelessDevice *>(m_device);
// the status is Activated and activeApInfo is empty if the hotspot status of this wireless device is enabled
Expand All @@ -58,6 +55,9 @@ WirelessTrayWidget::WirelessTrayWidget(WirelessDevice *device, QWidget *parent)
}
updateIcon();
});
connect(m_device, static_cast<void (NetworkDevice::*) (const QString &statStr) const>(&NetworkDevice::statusChanged), m_refershTimer, static_cast<void (QTimer::*) ()>(&QTimer::start));
connect(static_cast<WirelessDevice *>(m_device), &WirelessDevice::activeApInfoChanged, m_refershTimer, static_cast<void (QTimer::*) ()>(&QTimer::start));
connect(static_cast<WirelessDevice *>(m_device), &WirelessDevice::activeConnectionChanged, m_refershTimer, static_cast<void (QTimer::*) ()>(&QTimer::start));

// QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection);
init();
Expand Down

0 comments on commit bddcad5

Please sign in to comment.