From ca94cde772b0a23b67bb5e5b4995e451cdb4c82e Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Tue, 12 Mar 2024 20:54:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(lan):=20=E4=BF=AE=E5=A4=8D=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E9=9D=A2=E6=9D=BF=E6=9C=89=E7=BA=BF=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E8=8F=9C=E5=8D=95=E5=88=A0=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98(issues#I8YTVM)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/dbus_adaptor.cpp | 6 ++++++ src/backend/dbus_adaptor.h | 1 + src/backend/dbus_interface.h | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/src/backend/dbus_adaptor.cpp b/src/backend/dbus_adaptor.cpp index 56e99012..b483672d 100644 --- a/src/backend/dbus_adaptor.cpp +++ b/src/backend/dbus_adaptor.cpp @@ -33,6 +33,12 @@ NetworkAdaptor::~NetworkAdaptor() // destructor } +void NetworkAdaptor::deleteConnect(int type, QString ssid) +{ + // handle method call com.kylin.network.deleteConnect + QMetaObject::invokeMethod(parent(), "deleteConnect", Q_ARG(int, type), Q_ARG(QString, ssid)); +} + void NetworkAdaptor::activateConnect(int type, const QString &devName, const QString &ssid) { // handle method call com.kylin.network.activateConnect diff --git a/src/backend/dbus_adaptor.h b/src/backend/dbus_adaptor.h index e562a2d3..f457b85e 100644 --- a/src/backend/dbus_adaptor.h +++ b/src/backend/dbus_adaptor.h @@ -215,6 +215,7 @@ public: public: // PROPERTIES public Q_SLOTS: // METHODS + Q_NOREPLY void deleteConnect(int type, QString ssid); Q_NOREPLY void activateConnect(int type, const QString &devName, const QString &ssid); void activeWirelessAp(const QString &apName, const QString &apPassword, const QString &band, const QString &apDevice); Q_NOREPLY void deActivateConnect(int type, const QString &devName, const QString &ssid); diff --git a/src/backend/dbus_interface.h b/src/backend/dbus_interface.h index f8a73c64..ce2da866 100644 --- a/src/backend/dbus_interface.h +++ b/src/backend/dbus_interface.h @@ -36,6 +36,12 @@ public: ~ComKylinNetworkInterface(); public Q_SLOTS: // METHODS + inline Q_NOREPLY void deleteConnect(int type, const QString ssid) + { + QList argumentList; + argumentList << QVariant::fromValue(type) << QVariant::fromValue(ssid); + callWithArgumentList(QDBus::NoBlock, QStringLiteral("deleteConnect"), argumentList); + } inline Q_NOREPLY void activateConnect(int type, const QString &devName, const QString &ssid) { QList argumentList;