Merge branch '1215-main' into 'dbus-interface'

keyring开关接口

See merge request kylin-desktop/kylin-nm!484
This commit is contained in:
赵 世旭 2021-12-16 07:40:50 +00:00
commit b3482dc05e
6 changed files with 39 additions and 0 deletions

View File

@ -403,6 +403,9 @@ applet_agent_cancel_secrets_cb (AppletAgent *agent,
void agent_init()
{
if (NULL != kylinAgent) {
return;
}
GError *error = NULL;
kylinAgent = applet_agent_new (&error);
@ -414,3 +417,12 @@ void agent_init()
return;
}
void agent_clear()
{
if (NULL == kylinAgent) {
return;
}
g_clear_object (&kylinAgent);
kylinAgent = NULL;
}

View File

@ -3,6 +3,7 @@
#ifdef __cplusplus
extern "C"{
void agent_init();
void agent_clear();
}
#endif

View File

@ -234,3 +234,13 @@ void DbusAdaptor::reScan()
{
parent()->rescan();
}
void DbusAdaptor::keyRingInit()
{
parent()->keyRingInit();
}
void DbusAdaptor::keyRingClear()
{
parent()->keyRingClear();
}

View File

@ -83,6 +83,9 @@ public Q_SLOTS: // METHODS
QStringList getApInfoBySsid(QString devName, QString ssid);
//wifi扫描
void reScan();
//keyring
void keyRingInit();
void keyRingClear();
Q_SIGNALS: // SIGNALS
// void wirelessActivating(QString devName, QString ssid);
// void wiredActivating(QString devName, QString ssid);

View File

@ -711,3 +711,13 @@ void MainWindow::rescan()
{
m_wlanWidget->requestScan();
}
void MainWindow::keyRingInit()
{
agent_init();
}
void MainWindow::keyRingClear()
{
agent_clear();
}

View File

@ -68,6 +68,9 @@ public:
void rescan();
void keyRingInit();
void keyRingClear();
signals:
//设备插拔
void deviceStatusChanged();