Merge "fix device enable status error"

This commit is contained in:
石博文 2016-08-09 03:23:38 +00:00 committed by Deepin Code Review
commit 73b4873f4f
2 changed files with 10 additions and 0 deletions

View File

@ -54,6 +54,7 @@ WirelessApplet::WirelessApplet(const QSet<NetworkDevice>::const_iterator &device
connect(m_networkInter, &DBusNetwork::AccessPointPropertiesChanged, this, &WirelessApplet::APPropertiesChanged);
connect(m_networkInter, &DBusNetwork::DevicesChanged, this, &WirelessApplet::deviceStateChanegd);
connect(m_networkInter, &DBusNetwork::NeedSecrets, this, &WirelessApplet::needSecrets);
connect(m_networkInter, &DBusNetwork::DeviceEnabled, this, &WirelessApplet::deviceEnabled);
connect(m_controlPanel, &DeviceControlWidget::deviceEnableChanged, this, &WirelessApplet::deviceEnableChanged);
@ -256,6 +257,14 @@ void WirelessApplet::onActiveAPChanged()
emit activeAPChanged();
}
void WirelessApplet::deviceEnabled(const QString &devPath, const bool enable)
{
if (devPath != m_device.path())
return;
m_controlPanel->setDeviceEnabled(enable);
}
void WirelessApplet::activateAP(const QDBusObjectPath &apPath, const QString &ssid)
{
QString uuid;

View File

@ -38,6 +38,7 @@ private slots:
void deviceEnableChanged(const bool enable);
void deviceStateChanegd();
void onActiveAPChanged();
void deviceEnabled(const QString &devPath, const bool enable);
void activateAP(const QDBusObjectPath &apPath, const QString &ssid);
void needSecrets(const QString &apPath, const QString &uuid, const QString &ssid, const bool defaultAutoConnect);