ignore repeat ssid

Change-Id: If1c477a71296c853808333556f2e4c30311ef473
This commit is contained in:
石博文 2016-08-08 15:29:27 +08:00
parent fd2ed637d8
commit d971572654
Notes: Deepin Code Review 2016-08-08 07:33:44 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Mon, 08 Aug 2016 07:33:44 +0000
Reviewed-on: https://cr.deepin.io/14973
Project: dde/dde-dock
Branch: refs/heads/master
3 changed files with 8 additions and 3 deletions

View File

@ -32,7 +32,8 @@ AccessPoint::AccessPoint()
bool AccessPoint::operator==(const AccessPoint &ap) const
{
return m_path == ap.m_path;
// return m_path == ap.m_path;
return m_ssid == ap.ssid();
}
bool AccessPoint::operator>(const AccessPoint &ap) const

View File

@ -20,7 +20,11 @@ AccessPointWidget::AccessPointWidget(const AccessPoint &ap)
if (ap.secured())
m_securityIcon->setPixmap(QPixmap(":/wireless/resources/wireless/security.svg"));
else
m_securityIcon->setPixmap(QPixmap(16, 16));
{
QPixmap pixmap(16, 16);
pixmap.fill(Qt::transparent);
m_securityIcon->setPixmap(pixmap);
}
QHBoxLayout *infoLayout = new QHBoxLayout;
infoLayout->addWidget(m_securityIcon);

View File

@ -142,7 +142,7 @@ void WirelessApplet::APPropertiesChanged(const QString &devPath, const QString &
return;
*it = ap;
if (m_activeAP == ap)
if (m_activeAP.path() == ap.path())
{
m_activeAP = ap;
emit activeAPChanged();