From 8242bcfeefff7cb2e73b4e7e7953b1e161a42986 Mon Sep 17 00:00:00 2001 From: jzxc95 <907297917@qq.com> Date: Mon, 25 Oct 2021 16:40:18 +0800 Subject: [PATCH] signal add parameter --- src/backend/dbusadaptor.h | 2 +- src/frontend/mainwindow.h | 2 +- src/frontend/tab-pages/lanpage.cpp | 2 +- src/frontend/tab-pages/tabpage.h | 2 +- src/frontend/tab-pages/wlanpage.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/dbusadaptor.h b/src/backend/dbusadaptor.h index 31d56506..57f2c180 100644 --- a/src/backend/dbusadaptor.h +++ b/src/backend/dbusadaptor.h @@ -98,7 +98,7 @@ Q_SIGNALS: // SIGNALS void deactivateFailed(QString errorMessage); //设备插拔 void deviceStatusChanged(); - void deviceNameChanged(QString oldName, QString newName); + void deviceNameChanged(QString oldName, QString newName, int type); //热点断开 void hotspotDeactivated(QString devName, QString ssid); //热点连接 diff --git a/src/frontend/mainwindow.h b/src/frontend/mainwindow.h index ba9be182..edc19079 100644 --- a/src/frontend/mainwindow.h +++ b/src/frontend/mainwindow.h @@ -60,7 +60,7 @@ signals: //设备插拔 void deviceStatusChanged(); //设备名称变化 - void deviceNameChanged(QString oldName, QString newName); + void deviceNameChanged(QString oldName, QString newName, int type); //有线无线列表更新(有线增删、无线增加减少) void lanAdd(QString devName, QStringList info); void lanRemove(QString dbusPath); diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp index 908c99c7..168a202a 100644 --- a/src/frontend/tab-pages/lanpage.cpp +++ b/src/frontend/tab-pages/lanpage.cpp @@ -666,7 +666,7 @@ void LanPage::onDeviceNameUpdate(QString oldName, QString newName) initLanArea(); } - emit deviceNameChanged(oldName, newName); + emit deviceNameChanged(oldName, newName, WIRED); } } diff --git a/src/frontend/tab-pages/tabpage.h b/src/frontend/tab-pages/tabpage.h index 86ed6159..743dab8b 100644 --- a/src/frontend/tab-pages/tabpage.h +++ b/src/frontend/tab-pages/tabpage.h @@ -60,7 +60,7 @@ public: signals: void deviceStatusChanged(); - void deviceNameChanged(QString oldName, QString newName); + void deviceNameChanged(QString oldName, QString newName, int type); void activateFailed(QString errorMessage); void deactivateFailed(QString errorMessage); diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 8cdce33f..2ff32e02 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -715,7 +715,7 @@ void WlanPage::onDeviceNameUpdate(QString oldName, QString newName) initWlanArea(); } - emit deviceNameChanged(oldName, newName); + emit deviceNameChanged(oldName, newName, WIRELESS); } void WlanPage::sendApStateChangeSignal(QString uuid,