lintian检查以及版权修改

This commit is contained in:
liudun 2024-01-19 14:12:25 +08:00
parent 7905f37e44
commit 91749eba9e
253 changed files with 683 additions and 647 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -281,6 +281,7 @@ enum LOGINOPT_TYPE {
LOGINOPT_TYPE_VOICEPRINT, // 声纹 LOGINOPT_TYPE_VOICEPRINT, // 声纹
LOGINOPT_TYPE_FINGERVEIN, // 指静脉 LOGINOPT_TYPE_FINGERVEIN, // 指静脉
LOGINOPT_TYPE_GENERAL_UKEY, // 普通的ukey LOGINOPT_TYPE_GENERAL_UKEY, // 普通的ukey
LOGINOPT_TYPE_CUSTOM, // 第三方
LOGINOPT_TYPE_ADVANCED_UKEY, // 高阶的ukey LOGINOPT_TYPE_ADVANCED_UKEY, // 高阶的ukey
LOGINOPT_TYPE_QRCODE, // 二维码 LOGINOPT_TYPE_QRCODE, // 二维码
LOGINOPT_TYPE_OTHERS, // 其他 LOGINOPT_TYPE_OTHERS, // 其他

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2021 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2021 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,7 @@
pkg_check_modules(GLIB REQUIRED glib-2.0) pkg_check_modules(GLIB REQUIRED glib-2.0)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
find_package(KF5WindowSystem) find_package(KF5WindowSystem)
find_package(KF5Wayland)
include_directories( include_directories(
${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}
@ -28,4 +29,4 @@ set(Common_SRC
) )
add_library(Common STATIC ${Common_SRC}) add_library(Common STATIC ${Common_SRC})
target_link_libraries(Common Qt5::Core Qt5::DBus Qt5::Widgets Qt5::X11Extras ${GIOUNIX2_LIBRARIES} ${KF5Wayland_LIBRARIES} -lKF5WaylandClient -lKF5WaylandServer KF5::WindowSystem) target_link_libraries(Common Qt5::Core Qt5::DBus Qt5::Widgets Qt5::X11Extras ${GIOUNIX2_LIBRARIES} ${KF5Wayland_LIBRARIES} -lKF5WaylandClient -lKF5WaylandServer KF5::WindowSystem KF5::WaylandClient KF5::WaylandServer)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -43,9 +43,9 @@ BackThread::~BackThread()
} }
//get the connection state of wired and wireles network //get the connection state of wired and wireles network
IFace* BackThread::execGetIface() IFace BackThread::execGetIface()
{ {
IFace *iface = new IFace(); IFace iface;
QString tmpPath = "/tmp/kylin-nm-iface-" + QDir::home().dirName(); QString tmpPath = "/tmp/kylin-nm-iface-" + QDir::home().dirName();
QString cmd = "export LANG='en_US.UTF-8';export LANGUAGE='en_US';nmcli -f TYPE,DEVICE,STATE device > " + tmpPath; QString cmd = "export LANG='en_US.UTF-8';export LANGUAGE='en_US';nmcli -f TYPE,DEVICE,STATE device > " + tmpPath;
@ -64,8 +64,8 @@ IFace* BackThread::execGetIface()
QStringList txtList = txt.split("\n"); QStringList txtList = txt.split("\n");
file.close(); file.close();
iface->lstate = 2; iface.lstate = 2;
iface->wstate = 2; iface.wstate = 2;
for (int i = 1; i < txtList.size(); i ++) { for (int i = 1; i < txtList.size(); i ++) {
QString line = txtList.at(i); QString line = txtList.at(i);
@ -77,32 +77,32 @@ IFace* BackThread::execGetIface()
QString iname = lastStr.left(index2); QString iname = lastStr.left(index2);
QString istateStr = lastStr.mid(index2).trimmed(); QString istateStr = lastStr.mid(index2).trimmed();
if (type == "ethernet" && iface->lstate != 0) { if (type == "ethernet" && iface.lstate != 0) {
// if type is wired network // if type is wired network
iface->lname = iname; iface.lname = iname;
if (istateStr == "unmanaged") { if (istateStr == "unmanaged") {
iface->lstate = 2; //switch of wired device is off iface.lstate = 2; //switch of wired device is off
} }
if (istateStr == "disconnected" || istateStr == "unavailable") { if (istateStr == "disconnected" || istateStr == "unavailable") {
iface->lstate = 1; //wired network is disconnected iface.lstate = 1; //wired network is disconnected
} }
if (istateStr == "connected") { if (istateStr == "connected") {
iface->lstate = 0; //wired network is connected iface.lstate = 0; //wired network is connected
} }
} }
if (type == "wifi" && iface->wstate != 0) { if (type == "wifi" && iface.wstate != 0) {
// if type is wireless network // if type is wireless network
iface->wname = iname; iface.wname = iname;
if (istateStr == "unmanaged" || istateStr == "unavailable") { if (istateStr == "unmanaged" || istateStr == "unavailable") {
iface->wstate = 2; //switch of wireless device is off iface.wstate = 2; //switch of wireless device is off
} }
if (istateStr == "disconnected") { if (istateStr == "disconnected") {
iface->wstate = 1; //wireless network is disconnected iface.wstate = 1; //wireless network is disconnected
} }
if (istateStr == "connected") { if (istateStr == "connected") {
iface->wstate = 0; //wireless network is connected iface.wstate = 0; //wireless network is connected
} }
} }
} }
@ -120,7 +120,7 @@ void BackThread::execEnNet()
// int status = system("nmcli networking on"); // int status = system("nmcli networking on");
// if (status != 0){ syslog(LOG_ERR, "execute 'nmcli networking on' in function 'execEnNet' failed");} // if (status != 0){ syslog(LOG_ERR, "execute 'nmcli networking on' in function 'execEnNet' failed");}
while (1) { while (1) {
if (execGetIface()->lstate != 2) { if (execGetIface().lstate != 2) {
sleep(3); sleep(3);
emit enNetDone(); emit enNetDone();
emit btFinish(); emit btFinish();
@ -133,14 +133,14 @@ void BackThread::execEnNet()
//turn off the switch of wireless network first, then turn off the switch of network //turn off the switch of wireless network first, then turn off the switch of network
void BackThread::execDisNet() void BackThread::execDisNet()
{ {
if (execGetIface()->wstate != 2) { if (execGetIface().wstate != 2) {
char *chr = "nmcli radio wifi off"; char *chr = "nmcli radio wifi off";
Utils::m_system(chr); Utils::m_system(chr);
// int status = system("nmcli radio wifi off"); // int status = system("nmcli radio wifi off");
// if (status != 0){ syslog(LOG_ERR, "execute 'nmcli radio wifi off' in function 'execDisNet' failed");} // if (status != 0){ syslog(LOG_ERR, "execute 'nmcli radio wifi off' in function 'execDisNet' failed");}
while (1) { while (1) {
if (execGetIface()->wstate == 2) { if (execGetIface().wstate == 2) {
emit disWifiDone(); emit disWifiDone();
emit btFinish(); emit btFinish();
break; break;
@ -154,7 +154,7 @@ void BackThread::execDisNet()
// int status1 = system("nmcli networking off"); // int status1 = system("nmcli networking off");
// if (status1 != 0){ syslog(LOG_ERR, "execute 'nmcli networking off' in function 'execDisNet' failed");} // if (status1 != 0){ syslog(LOG_ERR, "execute 'nmcli networking off' in function 'execDisNet' failed");}
while (1) { while (1) {
if (execGetIface()->lstate == 2) { if (execGetIface().lstate == 2) {
emit disNetDone(); emit disNetDone();
emit btFinish(); emit btFinish();
break; break;
@ -185,7 +185,7 @@ void BackThread::execEnWifi()
//int status1 = system("nmcli radio wifi on"); //int status1 = system("nmcli radio wifi on");
//if (status1 != 0){ syslog(LOG_ERR, "execute 'nmcli radio wifi on' in function 'execEnWifi' failed");} //if (status1 != 0){ syslog(LOG_ERR, "execute 'nmcli radio wifi on' in function 'execEnWifi' failed");}
while (1) { while (1) {
if (execGetIface()->wstate != 2) { if (execGetIface().wstate != 2) {
KylinDBus objKyDbus; KylinDBus objKyDbus;
while (1) { while (1) {
if (objKyDbus.getAccessPointsNumber() > 0) { if (objKyDbus.getAccessPointsNumber() > 0) {
@ -211,7 +211,7 @@ void BackThread::execDisWifi()
// int status = system("nmcli radio wifi off"); // int status = system("nmcli radio wifi off");
// if (status != 0){ syslog(LOG_ERR, "execute 'nmcli radio wifi off' in function 'execDisWifi' failed");} // if (status != 0){ syslog(LOG_ERR, "execute 'nmcli radio wifi off' in function 'execDisWifi' failed");}
while (1) { while (1) {
if (execGetIface()->wstate == 2) { if (execGetIface().wstate == 2) {
KylinNM::reflashWifiUi(); KylinNM::reflashWifiUi();
emit disWifiDone(); emit disWifiDone();
emit btFinish(); emit btFinish();
@ -233,8 +233,8 @@ void BackThread::execConnLan(QString connName)
Utils::m_system(cmd.toUtf8().data()); Utils::m_system(cmd.toUtf8().data());
// int status = system(cmd.toUtf8().data()); // int status = system(cmd.toUtf8().data());
// if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection up' in function 'execConnLan' failed");} // if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection up' in function 'execConnLan' failed");}
qDebug()<<"debug: in function execConnLan, wired net state is: "<<QString::number(execGetIface()->lstate); qDebug()<<"debug: in function execConnLan, wired net state is: "<<QString::number(execGetIface().lstate);
syslog(LOG_DEBUG, "In function execConnLan, wired net state is: %d", execGetIface()->lstate); syslog(LOG_DEBUG, "In function execConnLan, wired net state is: %d", execGetIface().lstate);
emit connDone(0); emit connDone(0);
} else { } else {
qDebug()<<"connect wired network failed for without wired cable plug in."; qDebug()<<"connect wired network failed for without wired cable plug in.";
@ -263,8 +263,8 @@ void BackThread::execConnWifiPWD(QString connName, QString password)
file.close(); file.close();
if (line.indexOf("successfully") != -1) { if (line.indexOf("successfully") != -1) {
emit connDone(0); emit connDone(0);
qDebug()<<"debug: in function execConnWifiPWD, wireless net state is: "<<QString::number(execGetIface()->wstate); qDebug()<<"debug: in function execConnWifiPWD, wireless net state is: "<<QString::number(execGetIface().wstate);
syslog(LOG_DEBUG, "In function execConnWifiPWD, wireless net state is: %d", execGetIface()->wstate); syslog(LOG_DEBUG, "In function execConnWifiPWD, wireless net state is: %d", execGetIface().wstate);
} else { } else {
emit connDone(1); emit connDone(1);
} }
@ -293,8 +293,8 @@ void BackThread::on_readoutput()
qDebug()<<"on_readoutput: "<< str; qDebug()<<"on_readoutput: "<< str;
if (str.indexOf("successfully") != -1) { if (str.indexOf("successfully") != -1) {
emit connDone(0); //send this signal if connect net successfully emit connDone(0); //send this signal if connect net successfully
qDebug()<<"debug: in function on_readoutput, wireless net state is: "<<QString::number(execGetIface()->wstate); qDebug()<<"debug: in function on_readoutput, wireless net state is: "<<QString::number(execGetIface().wstate);
syslog(LOG_DEBUG, "In function on_readoutput, wireless net state is: %d", execGetIface()->wstate); syslog(LOG_DEBUG, "In function on_readoutput, wireless net state is: %d", execGetIface().wstate);
} else if(str.indexOf("unknown") != -1) { } else if(str.indexOf("unknown") != -1) {
emit connDone(2); emit connDone(2);
} else { } else {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@
class IFace{ class IFace{
public: public:
QString lname; QString lname = "";
QString wname; QString wname = "";
int lstate; // 0已连接 1未连接 2已关闭 int lstate = 2; // 0已连接 1未连接 2已关闭
int wstate; // 0已连接 1未连接 2已关闭 int wstate = 2; // 0已连接 1未连接 2已关闭
}; };
class BackThread : public QObject class BackThread : public QObject
@ -45,7 +45,7 @@ public:
explicit BackThread(QObject *parent = nullptr); explicit BackThread(QObject *parent = nullptr);
~BackThread(); ~BackThread();
IFace* execGetIface(); IFace execGetIface();
QString getConnProp(QString connName); QString getConnProp(QString connName);
QString execChkLanWidth(QString ethName); QString execChkLanWidth(QString ethName);
QProcess *cmdConnWifi = nullptr; QProcess *cmdConnWifi = nullptr;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -187,8 +187,11 @@ conlist *kylin_network_get_conlist_info()
} }
//获取当前活动网络连接 //获取当前活动网络连接
activecon *kylin_network_get_activecon_info() int kylin_network_get_activecon_info(activecon** activelist, int* count)
{ {
if (*activelist != NULL || !count) {
return -1;
}
struct passwd *pwd; struct passwd *pwd;
pwd = getpwuid(getuid()); pwd = getpwuid(getuid());
char *name = pwd->pw_name; char *name = pwd->pw_name;
@ -213,6 +216,7 @@ activecon *kylin_network_get_activecon_info()
if((activefp=fopen(filename,"r"))==NULL) if((activefp=fopen(filename,"r"))==NULL)
{ {
printf("error!"); printf("error!");
return -1;
} }
fgets(activeStrLine,1024,activefp); fgets(activeStrLine,1024,activefp);
while(!feof(activefp)) while(!feof(activefp))
@ -222,22 +226,22 @@ activecon *kylin_network_get_activecon_info()
} }
// printf("%d\n",activenum); // printf("%d\n",activenum);
fclose(activefp); fclose(activefp);
activecon *activelist=(activecon *)malloc(sizeof(activecon)*activenum); *activelist=(activecon *)malloc(sizeof(activecon)*activenum);
int count=0; *count=0;
FILE *fp; FILE *fp;
char StrLine[1024]; char StrLine[1024];
if((fp=fopen(filename,"r"))==NULL) if((fp=fopen(filename,"r"))==NULL)
{ {
printf("error!"); printf("error!");
return -1;
} }
free(path); free(path);
fgets(StrLine,1024,fp); fgets(StrLine,1024,fp);
while(!feof(fp)) while(!feof(fp))
{ {
if(count==activenum-1)break; if(*count==activenum-1)break;
fgets(StrLine,1024,fp); fgets(StrLine,1024,fp);
@ -257,10 +261,9 @@ activecon *kylin_network_get_activecon_info()
} }
// printf("连接名称长度:%d\n",num); // printf("连接名称长度:%d\n",num);
activelist[count].con_name=(char *)malloc(sizeof(char)*(num+1));
strncpy(conname,StrLine,num+1); strncpy(conname,StrLine,num+1);
conname[num]='\0'; conname[num]='\0';
strncpy(activelist[count].con_name,conname,num+1); strncpy((*activelist)[*count].con_name,conname,num+1);
// printf("%s\n",activelist[count].con_name); // printf("%s\n",activelist[count].con_name);
//截取连接类型 //截取连接类型
@ -291,10 +294,9 @@ activecon *kylin_network_get_activecon_info()
if(*index2==' ')break; if(*index2==' ')break;
num1++; num1++;
} }
activelist[count].type=(char *)malloc(sizeof(char)*(num1+1));
strncpy(type,index1+2,num1+1); strncpy(type,index1+2,num1+1);
type[num1]='\0'; type[num1]='\0';
strncpy(activelist[count].type,type,num1+1); strncpy((*activelist)[*count].type,type,num1+1);
// printf("%s\n",activelist[count].type); // printf("%s\n",activelist[count].type);
//截取连接所属设备 //截取连接所属设备
@ -315,20 +317,14 @@ activecon *kylin_network_get_activecon_info()
if(*index4==' ')break; if(*index4==' ')break;
num2++; num2++;
} }
activelist[count].dev=(char *)malloc(sizeof(char)*(num2+1));
strncpy(dev,index3+1,num2+1); strncpy(dev,index3+1,num2+1);
dev[num2]='\0'; dev[num2]='\0';
strncpy(activelist[count].dev,dev,num2+1); strncpy((*activelist)[*count].dev,dev,num2+1);
// printf("%s\n",activelist[count].dev); // printf("%s\n",activelist[count].dev);
count++; (*count)++;
} }
fclose(fp); fclose(fp);
return 0;
activelist[count].con_name=NULL;
activelist[count].type=NULL;
activelist[count].dev=NULL;
return activelist;
} }
//创建新的以太网连接 //创建新的以太网连接
@ -829,6 +825,7 @@ long *kylin_network_get_bytes(char *if_name)
if(i == 10) if(i == 10)
{ {
rtbyt[1] = atol(value); rtbyt[1] = atol(value);
free(value);
break; break;
} }
free(value); free(value);
@ -869,6 +866,7 @@ long *kylin_network_get_packets(char *if_name)
if(i == 11) if(i == 11)
{ {
rtpkt[1] = atol(value); rtpkt[1] = atol(value);
free(value);
break; break;
} }
free(value); free(value);
@ -909,6 +907,7 @@ long *kylin_network_get_errs(char *if_name)
if(i == 12) if(i == 12)
{ {
rterrs[1] = atol(value); rterrs[1] = atol(value);
free(value);
break; break;
} }
free(value); free(value);
@ -949,6 +948,7 @@ long *kylin_network_get_drop(char *if_name)
if(i == 13) if(i == 13)
{ {
rtdrop[1] = atol(value); rtdrop[1] = atol(value);
free(value);
break; break;
} }
free(value); free(value);
@ -989,6 +989,7 @@ long *kylin_network_get_fifo(char *if_name)
if(i == 14) if(i == 14)
{ {
rtfifo[1] = atol(value); rtfifo[1] = atol(value);
free(value);
break; break;
} }
free(value); free(value);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -52,9 +52,9 @@ typedef struct
typedef struct typedef struct
{ {
char *con_name;//活动网络连接名称 char con_name[128];//活动网络连接名称
char *type;//活动网络连接类型 char type[128];//活动网络连接类型
char *dev;//活动网络所属设备 char dev[128];//活动网络所属设备
}activecon;//存放当前活动网络连接 }activecon;//存放当前活动网络连接
/* /*
@ -71,9 +71,9 @@ conlist *kylin_network_get_conlist_info();
/* /*
* Get the active network connection. * Get the active network connection.
* return the struct pointer. * return the struct pointer and list count.
*/ */
activecon *kylin_network_get_activecon_info(); int kylin_network_get_activecon_info(activecon** activelist, int* count);
/* /*
* Create a new Ethernet connection. * Create a new Ethernet connection.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -489,26 +489,26 @@ void KylinNM::getInitLanSlist()
// 初始化网络 // 初始化网络
void KylinNM::initNetwork() void KylinNM::initNetwork()
{ {
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
wname = iface->wname; wname = iface.wname;
lwname = iface->wname; lwname = iface.wname;
lname = iface->lname; lname = iface.lname;
llname = iface->lname; llname = iface.lname;
mwBandWidth = bt->execChkLanWidth(lname); mwBandWidth = bt.execChkLanWidth(lname);
// 开关状态 // 开关状态
qDebug()<<"==="; qDebug()<<"===";
qDebug()<<"state of network: '0' is connected, '1' is disconnected, '2' is net device switch off"; qDebug()<<"state of network: '0' is connected, '1' is disconnected, '2' is net device switch off";
syslog(LOG_DEBUG, "state of network: '0' is connected, '1' is disconnected, '2' is net device switch off"); syslog(LOG_DEBUG, "state of network: '0' is connected, '1' is disconnected, '2' is net device switch off");
qDebug()<<"current network state: lan state ="<<iface->lstate<<", wifi state ="<<iface->wstate ; qDebug()<<"current network state: lan state ="<<iface.lstate<<", wifi state ="<<iface.wstate ;
syslog(LOG_DEBUG, "current network state: wired state =%d, wifi state =%d", iface->lstate, iface->wstate); syslog(LOG_DEBUG, "current network state: wired state =%d, wifi state =%d", iface.lstate, iface.wstate);
qDebug()<<"==="; qDebug()<<"===";
//ui->lbBtnNetBG->setStyleSheet(btnOnQss); //ui->lbBtnNetBG->setStyleSheet(btnOnQss);
if (iface->wstate == 0 || iface->wstate == 1 || iface->wstate == 3) { if (iface.wstate == 0 || iface.wstate == 1 || iface.wstate == 3) {
// ui->lbBtnWifiBG->setStyleSheet(btnBgOnQss); // ui->lbBtnWifiBG->setStyleSheet(btnBgOnQss);
//ui->lbBtnWifiBall->move(X_RIGHT_WIFI_BALL, Y_WIFI_BALL); //ui->lbBtnWifiBall->move(X_RIGHT_WIFI_BALL, Y_WIFI_BALL);
btnWireless->setSwitchStatus(true); btnWireless->setSwitchStatus(true);
@ -519,11 +519,11 @@ void KylinNM::initNetwork()
} }
// 初始化网络列表 // 初始化网络列表
if (iface->wstate != 2) { if (iface.wstate != 2) {
if (iface->wstate == 0) { if (iface.wstate == 0) {
connWifiDone(3); connWifiDone(3);
} else { } else {
if (iface->lstate == 0) { if (iface.lstate == 0) {
connLanDone(3); connLanDone(3);
} }
} }
@ -533,8 +533,8 @@ void KylinNM::initNetwork()
ui->btnWifiList->setStyleSheet("QPushButton{border:none;}"); ui->btnWifiList->setStyleSheet("QPushButton{border:none;}");
} else { } else {
objKyDBus->setWifiSwitchState(false); //通知控制面板wifi未开启 objKyDBus->setWifiSwitchState(false); //通知控制面板wifi未开启
if (iface->lstate != 2) { if (iface.lstate != 2) {
if (iface->lstate == 0) { if (iface.lstate == 0) {
connLanDone(3); connLanDone(3);
} }
onBtnNetListClicked(); onBtnNetListClicked();
@ -544,7 +544,7 @@ void KylinNM::initNetwork()
} else { } else {
/*没看懂这段断开连接是什么意思,暂时关闭这段操作,会导致页面卡顿、某些情景还会自动断开网络 /*没看懂这段断开连接是什么意思,暂时关闭这段操作,会导致页面卡顿、某些情景还会自动断开网络
// BackThread *m_bt = new BackThread(); // BackThread *m_bt = new BackThread();
// IFace *m_iface = m_bt->execGetIface(); // m_bt->execGetIface();
// m_bt->disConnLanOrWifi("ethernet"); // m_bt->disConnLanOrWifi("ethernet");
// sleep(1); // sleep(1);
@ -552,7 +552,6 @@ void KylinNM::initNetwork()
// sleep(1); // sleep(1);
// m_bt->disConnLanOrWifi("ethernet"); // m_bt->disConnLanOrWifi("ethernet");
// delete m_iface;
// m_bt->deleteLater(); // m_bt->deleteLater();
*/ */
@ -683,16 +682,13 @@ void KylinNM::updateNetList()
} }
is_stop_check_net_state = 1; is_stop_check_net_state = 1;
if (is_btnWifiList_clicked == 1) { if (is_btnWifiList_clicked == 1) {
BackThread *loop_bt = new BackThread(); BackThread loop_bt;
IFace *loop_iface = loop_bt->execGetIface(); IFace loop_iface = loop_bt.execGetIface();
if (loop_iface->wstate != 2) { if (loop_iface.wstate != 2) {
is_update_wifi_list = 1; is_update_wifi_list = 1;
this->ksnm->execGetWifiList(); //更新wifi列表 this->ksnm->execGetWifiList(); //更新wifi列表
} }
delete loop_iface;
loop_bt->deleteLater();
} }
is_stop_check_net_state = 0; is_stop_check_net_state = 0;
} }
@ -724,16 +720,13 @@ void KylinNM::iconActivated(QSystemTrayIcon::ActivationReason reason)
} }
is_stop_check_net_state = 1; is_stop_check_net_state = 1;
if (is_btnWifiList_clicked == 1) { if (is_btnWifiList_clicked == 1) {
BackThread *loop_bt = new BackThread(); BackThread loop_bt;
IFace *loop_iface = loop_bt->execGetIface(); IFace loop_iface = loop_bt.execGetIface();
if (loop_iface->wstate != 2) { if (loop_iface.wstate != 2) {
is_update_wifi_list = 1; is_update_wifi_list = 1;
this->ksnm->execGetWifiList(); //更新wifi列表 this->ksnm->execGetWifiList(); //更新wifi列表
} }
delete loop_iface;
loop_bt->deleteLater();
} }
is_stop_check_net_state = 0; is_stop_check_net_state = 0;
} else { } else {
@ -912,9 +905,13 @@ void KylinNM::getActiveInfo()
QString actLanName = "--"; QString actLanName = "--";
QString actWifiName = "--"; QString actWifiName = "--";
activecon *act = kylin_network_get_activecon_info(); activecon *act = NULL;
int count = 0;
kylin_network_get_activecon_info(&act, &count);
if(!act)
return ;
int index = 0; int index = 0;
while (act[index].con_name != NULL) { while (act && index < count) {
if (QString(act[index].type) == "ethernet" || QString(act[index].type) == "802-3-ethernet") { if (QString(act[index].type) == "ethernet" || QString(act[index].type) == "802-3-ethernet") {
actLanName = QString(act[index].con_name); actLanName = QString(act[index].con_name);
} }
@ -923,7 +920,9 @@ void KylinNM::getActiveInfo()
} }
index ++; index ++;
} }
if (act) {
free(act);
}
//ukui3.0中获取currentActWifiSignalLv的值 //ukui3.0中获取currentActWifiSignalLv的值
if (activeWifiSignalLv > 75) { if (activeWifiSignalLv > 75) {
@ -979,14 +978,12 @@ void KylinNM::onPhysicalCarrierChanged(bool flag)
qDebug()<<"拔出了有线网的网线"; qDebug()<<"拔出了有线网的网线";
syslog(LOG_DEBUG,"wired physical cable is already plug out"); syslog(LOG_DEBUG,"wired physical cable is already plug out");
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
if (iface->lstate != 0) { if (iface.lstate != 0) {
is_stop_check_net_state = 1; is_stop_check_net_state = 1;
wiredCableDownTimer->start(2000); wiredCableDownTimer->start(2000);
} }
delete iface;
bt->deleteLater();
} }
} }
@ -1017,13 +1014,12 @@ void KylinNM::onCarrierDownHandle()
void KylinNM::onDeleteLan() void KylinNM::onDeleteLan()
{ {
deleteLanTimer->stop(); deleteLanTimer->stop();
BackThread *btn_bt = new BackThread(); BackThread btn_bt;
btn_bt->disConnLanOrWifi("ethernet"); btn_bt.disConnLanOrWifi("ethernet");
sleep(1); sleep(1);
btn_bt->disConnLanOrWifi("ethernet"); btn_bt.disConnLanOrWifi("ethernet");
sleep(1); sleep(1);
btn_bt->disConnLanOrWifi("ethernet"); btn_bt.disConnLanOrWifi("ethernet");
btn_bt->deleteLater();
this->stopLoading(); this->stopLoading();
onBtnNetListClicked(0); onBtnNetListClicked(0);
@ -1079,42 +1075,36 @@ void KylinNM::checkIsWirelessDeviceOn()
void KylinNM::getLanBandWidth() void KylinNM::getLanBandWidth()
{ {
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
lname = iface->lname; lname = iface.lname;
mwBandWidth = bt->execChkLanWidth(lname); mwBandWidth = bt.execChkLanWidth(lname);
} }
//检测网络设备状态 //检测网络设备状态
bool KylinNM::checkLanOn() bool KylinNM::checkLanOn()
{ {
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
if (iface->lstate == 2) { if (iface.lstate == 2) {
return false; return false;
} else { } else {
return true; return true;
} }
delete iface;
bt->deleteLater();
} }
bool KylinNM::checkWlOn() bool KylinNM::checkWlOn()
{ {
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
bool ret = true; bool ret = true;
if (iface->wstate == 2) { if (iface.wstate == 2) {
ret = false; ret = false;
} }
delete iface;
bt->deleteLater();
return ret; return ret;
} }
@ -1307,14 +1297,14 @@ void KylinNM::onBtnNetListClicked(int flag)
ui->lbNetListBG->setStyleSheet(btnOnQss); ui->lbNetListBG->setStyleSheet(btnOnQss);
ui->lbWifiListBG->setStyleSheet(btnOffQss); ui->lbWifiListBG->setStyleSheet(btnOffQss);
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
lbLoadDown->show(); lbLoadDown->show();
lbLoadUp->show(); lbLoadUp->show();
lbLoadDownImg->show(); lbLoadDownImg->show();
lbLoadUpImg->show(); lbLoadUpImg->show();
if (iface->lstate != 0) { if (iface.lstate != 0) {
lbLoadDown->hide(); lbLoadDown->hide();
lbLoadUp->hide(); lbLoadUp->hide();
lbLoadDownImg->hide(); lbLoadDownImg->hide();
@ -1340,7 +1330,7 @@ void KylinNM::onBtnNetListClicked(int flag)
return; return;
} }
if (iface->lstate != 2) { if (iface.lstate != 2) {
this->startLoading(); this->startLoading();
this->ksnm->execGetLanList(); this->ksnm->execGetLanList();
} else { } else {
@ -1360,10 +1350,6 @@ void KylinNM::onBtnNetListClicked(int flag)
ui->lbWifiListImg->setStyleSheet("QLabel{border-image:url(:/res/x/pb-wifi-n.png);background-position:center;background-repeat:no-repeat;}"); ui->lbWifiListImg->setStyleSheet("QLabel{border-image:url(:/res/x/pb-wifi-n.png);background-position:center;background-repeat:no-repeat;}");
lbNetListText->setStyleSheet("QLabel{color:rgba(47, 179, 232, 1);background-color:transparent;}"); lbNetListText->setStyleSheet("QLabel{color:rgba(47, 179, 232, 1);background-color:transparent;}");
lbWifiListText->setStyleSheet("QLabel{color:rgba(38, 38, 38, 0.75);background-color:transparent;}"); lbWifiListText->setStyleSheet("QLabel{color:rgba(38, 38, 38, 0.75);background-color:transparent;}");
delete iface;
bt->deleteLater();
} }
// 当点击wifi标题的时候执行 // 当点击wifi标题的时候执行
@ -1372,14 +1358,14 @@ void KylinNM::on_btnWifiList_clicked()
this->is_btnWifiList_clicked = 1; this->is_btnWifiList_clicked = 1;
this->is_btnNetList_clicked = 0; this->is_btnNetList_clicked = 0;
BackThread *bt = new BackThread(); BackThread bt;
IFace *iface = bt->execGetIface(); IFace iface = bt.execGetIface();
lbLoadDown->show(); lbLoadDown->show();
lbLoadUp->show(); lbLoadUp->show();
lbLoadDownImg->show(); lbLoadDownImg->show();
lbLoadUpImg->show(); lbLoadUpImg->show();
if (iface->wstate != 0) { if (iface.wstate != 0) {
lbLoadDown->hide(); lbLoadDown->hide();
lbLoadUp->hide(); lbLoadUp->hide();
lbLoadDownImg->hide(); lbLoadDownImg->hide();
@ -1394,7 +1380,7 @@ void KylinNM::on_btnWifiList_clicked()
btnWireless->show(); btnWireless->show();
//ui->lbBtnWifiBG->show(); //ui->lbBtnWifiBG->show();
//ui->lbBtnWifiBall->show(); //ui->lbBtnWifiBall->show();
if (iface->wstate == 0 || iface->wstate == 1 || iface->wstate == 3) { if (iface.wstate == 0 || iface.wstate == 1 || iface.wstate == 3) {
//ui->lbBtnWifiBG->setStyleSheet(btnBgOnQss); //ui->lbBtnWifiBG->setStyleSheet(btnBgOnQss);
//ui->lbBtnWifiBall->move(X_RIGHT_WIFI_BALL, Y_WIFI_BALL); //ui->lbBtnWifiBall->move(X_RIGHT_WIFI_BALL, Y_WIFI_BALL);
btnWireless->setSwitchStatus(true); btnWireless->setSwitchStatus(true);
@ -1404,7 +1390,7 @@ void KylinNM::on_btnWifiList_clicked()
btnWireless->setSwitchStatus(false); btnWireless->setSwitchStatus(false);
} }
if (iface->wstate != 2) { if (iface.wstate != 2) {
//ui->lbBtnWifiBG->setStyleSheet(btnBgOnQss); //ui->lbBtnWifiBG->setStyleSheet(btnBgOnQss);
//ui->lbBtnWifiBall->move(X_RIGHT_WIFI_BALL, Y_WIFI_BALL); //ui->lbBtnWifiBall->move(X_RIGHT_WIFI_BALL, Y_WIFI_BALL);
btnWireless->setSwitchStatus(true); btnWireless->setSwitchStatus(true);
@ -1462,9 +1448,6 @@ void KylinNM::on_btnWifiList_clicked()
this->scrollAreaw->show(); this->scrollAreaw->show();
this->topWifiListWidget->show(); this->topWifiListWidget->show();
on_btnWifiList_pressed(); on_btnWifiList_pressed();
delete iface;
bt->deleteLater();
} }
void KylinNM::on_btnNetList_pressed() void KylinNM::on_btnNetList_pressed()
@ -1516,16 +1499,20 @@ void KylinNM::getLanListDone(QStringList slist)
// 获取当前连接的lan name // 获取当前连接的lan name
QString actLanName = "--"; QString actLanName = "--";
activecon *act = kylin_network_get_activecon_info(); activecon *act = NULL;
int count = 0;
kylin_network_get_activecon_info(&act, &count);
int index = 0; int index = 0;
while (act[index].con_name != NULL) { while (act && index < count) {
if (QString(act[index].type) == "ethernet" || QString(act[index].type) == "802-3-ethernet") { if (QString(act[index].type) == "ethernet" || QString(act[index].type) == "802-3-ethernet") {
actLanName = QString(act[index].con_name); actLanName = QString(act[index].con_name);
break; break;
} }
index ++; index ++;
} }
if (act) {
free(act);
}
// 若当前lan name为"--"设置OneConnForm // 若当前lan name为"--"设置OneConnForm
OneLancForm *ccf = new OneLancForm(topLanListWidget, this, confForm, ksnm); OneLancForm *ccf = new OneLancForm(topLanListWidget, this, confForm, ksnm);
@ -1686,15 +1673,21 @@ void KylinNM::loadWifiListDone(QStringList slist)
actWifiBssidList.append("--"); actWifiBssidList.append("--");
} }
activecon *act = kylin_network_get_activecon_info(); activecon *act = NULL;
int wifiCount = 0;
kylin_network_get_activecon_info(&act, &wifiCount);
int index = 0; int index = 0;
while (act[index].con_name != NULL) { while (act && index < wifiCount) {
if (QString(act[index].type) == "wifi" || QString(act[index].type) == "802-11-wireless") { if (QString(act[index].type) == "wifi" || QString(act[index].type) == "802-11-wireless") {
actWifiName = QString(act[index].con_name); actWifiName = QString(act[index].con_name);
break; break;
} }
index ++; index ++;
} }
if (act) {
free(act);
}
// 根据当前连接的wifi 设置OneConnForm // 根据当前连接的wifi 设置OneConnForm
OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm); OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm);
if (actWifiName == "--" && actWifiBssidList.at(0) == "--") { if (actWifiName == "--" && actWifiBssidList.at(0) == "--") {
@ -2381,8 +2374,8 @@ void KylinNM::activeGetWifiList()
//网络开关处理,打开与关闭网络 //网络开关处理,打开与关闭网络
void KylinNM::enNetDone() void KylinNM::enNetDone()
{ {
BackThread *bt = new BackThread(); BackThread bt;
mwBandWidth = bt->execChkLanWidth(lname); mwBandWidth = bt.execChkLanWidth(lname);
ui->lbBtnNetBG->setStyleSheet(btnOnQss); ui->lbBtnNetBG->setStyleSheet(btnOnQss);
@ -2470,7 +2463,6 @@ void KylinNM::enWifiDone()
qDebug()<<"debug: already turn on the switch of wifi network"; qDebug()<<"debug: already turn on the switch of wifi network";
syslog(LOG_DEBUG, "Already turn on the switch of wifi network"); syslog(LOG_DEBUG, "Already turn on the switch of wifi network");
QTimer::singleShot(200, this, &KylinNM::onConnectChanged);
} }
void KylinNM::disWifiDone() void KylinNM::disWifiDone()
{ {
@ -2606,16 +2598,13 @@ void KylinNM::onExternalWifiSwitchChange(bool wifiEnabled)
void KylinNM::on_checkWifiListChanged() void KylinNM::on_checkWifiListChanged()
{ {
if (is_stop_check_net_state==0 && this->is_btnWifiList_clicked==1 && this->isVisible()) { if (is_stop_check_net_state==0 && this->is_btnWifiList_clicked==1 && this->isVisible()) {
BackThread *loop_bt = new BackThread(); BackThread loop_bt;
IFace *loop_iface = loop_bt->execGetIface(); IFace loop_iface = loop_bt.execGetIface();
if (loop_iface->wstate != 2) { if (loop_iface.wstate != 2) {
is_update_wifi_list = 1; is_update_wifi_list = 1;
this->ksnm->execGetWifiList(); //更新wifi列表 this->ksnm->execGetWifiList(); //更新wifi列表
} }
delete loop_iface;
loop_bt->deleteLater();
} }
} }
@ -2766,9 +2755,14 @@ int KylinNM::getConnectStatus()
QString actLanName = "--"; QString actLanName = "--";
QString actWifiName = "--"; QString actWifiName = "--";
activecon *act = kylin_network_get_activecon_info(); activecon *act = NULL;
int count = 0;
kylin_network_get_activecon_info(&act, &count);
int index = 0; int index = 0;
while (act[index].con_name != NULL) { if(!act){
return -1;
}
while (act && index < count) {
if (QString(act[index].type) == "ethernet" || QString(act[index].type) == "802-3-ethernet") { if (QString(act[index].type) == "ethernet" || QString(act[index].type) == "802-3-ethernet") {
actLanName = QString(act[index].con_name); actLanName = QString(act[index].con_name);
} }
@ -2777,6 +2771,9 @@ int KylinNM::getConnectStatus()
} }
index ++; index ++;
} }
if (act) {
free(act);
}
//ukui3.0中获取currentActWifiSignalLv的值 //ukui3.0中获取currentActWifiSignalLv的值
if (activeWifiSignalLv > 75) { if (activeWifiSignalLv > 75) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2023 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * Copyright (C) 2023, KylinSoft Co., Ltd.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -3,5 +3,5 @@ install(FILES ukui-screensaver.desktop DESTINATION /etc/xdg/autostart)
install(FILES ukui-screensaver.directory DESTINATION /usr/share/desktop-directories) install(FILES ukui-screensaver.directory DESTINATION /usr/share/desktop-directories)
install(FILES ukui-screensavers.menu DESTINATION /etc/xdg/menus) install(FILES ukui-screensavers.menu DESTINATION /etc/xdg/menus)
install(FILES ukui-screensaver-qt DESTINATION /etc/pam.d) install(FILES ukui-screensaver-qt DESTINATION /etc/pam.d)
install(FILES screensaver-startup.sh DESTINATION /usr/bin) install(FILES screensaver-startup DESTINATION /usr/bin)
install(FILES ukui-screensaver-dialog.desktop DESTINATION /usr/share/applications) install(FILES ukui-screensaver-dialog.desktop DESTINATION /usr/share/applications)

260
debian/changelog vendored
View File

@ -1,202 +1,202 @@
ukui-screensaver (4.0.0.0-ok7~0825) yangtze; urgency=medium ukui-screensaver (4.0.0.0-1) noble; urgency=medium
* BUG号I72HS3【次要】【电源管理】设置合盖时锁屏或休眠开盖时出现键盘界面 * New upstream release.
* 需求号:无
* 其他修改说明:无
-- Yang Min <yangmin@kylinos.cn> Fri, 25 Aug 2023 08:58:00 +0800 -- liudun <liudun@kylinos.cn> Fri, 8 Sep 2023 13:51:43 +0800
ukui-screensaver (4.0.0.0-ok6~0808) yangtze; urgency=medium ukui-screensaver (3.0.3.2-1) unstable; urgency=medium
* BUG号I7JFT2 屏保时空格键无法唤醒登录密码输入框 * Use qt5_add_translation instead of qt5_create_translation.
I729TV 【用户切换】用户切换进入已登录用用户时,存在闪过屏保锁屏界面 (Closes: #1042303)
I774FQ 【锁屏】进入锁屏切换用户到其他用户,再切换回来后登录进入桌面过程中右下角弹出切换用户窗口
* 需求号:无
* 其他修改说明:无
* commit id:004330d
-- Yang Min <yangmin@kylinos.cn> Tue, 08 Aug 2023 09:45:26 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Mon, 21 Aug 2023 15:32:43 +0800
ukui-screensaver (4.0.0.0-ok5~0705) yangtze; urgency=medium ukui-screensaver (3.0.3.1-1) unstable; urgency=medium
* BUG号 [ Adrian Bunk ]
* 需求号:无 * Fix FTBFS with new glib. (Closes: #1020068)
* 其他修改说明:修改changlog
-- liudun <liudun@kylinos.cn> Wed, 05 Jul 2023 19:54:42 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Mon, 17 Oct 2022 19:27:09 +0800
ukui-screensaver (4.0.0.0-ok4~0705) yangtze; urgency=medium ukui-screensaver (3.0.3-1) unstable; urgency=medium
* BUG号 * New upstream release.
* 需求号:无
* 其他修改说明添加layer-shell-qt的运行依赖
-- liudun <liudun@kylinos.cn> Wed, 05 Jul 2023 19:20:57 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Tue, 22 Feb 2022 14:20:17 +0800
ukui-screensaver (4.0.0.0-ok4~0704) yangtze; urgency=medium ukui-screensaver (3.0.2-1) unstable; urgency=medium
* BUG号bug##I72EYT【次要】【锁屏】锁屏界面平板模式切换横竖屏后软键盘下方显示不全wayland中文 * New upstream release.
* 需求号:无
* 其他修改说明更新changelog
-- liuyuanpeng <liuyuanpeng@kylinos.cn> Tue, 04 Jul 2023 15:41:42 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Tue, 17 Aug 2021 20:41:03 +0800
ukui-screensaver (4.0.0.0-ok3~0704) yangtze; urgency=medium ukui-screensaver (3.0.1-1) unstable; urgency=medium
* BUG号bug##I72EYT【次要】【锁屏】锁屏界面平板模式切换横竖屏后软键盘下方显示不全wayland中文 * New upstream bugfix release.
* 需求号:无
* 其他修改说明:处理编译依赖问题
-- liudun <liudun@kylinos.cn> Tue, 04 Jul 2023 10:34:46 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Sun, 27 Sep 2020 14:47:09 +0800
ukui-screensaver (4.0.0.0-ok3~0628) yangtze; urgency=medium ukui-screensaver (3.0.0-1) unstable; urgency=medium
* BUG号bug#I69CSS【锁屏】合盖后重新打开进入锁屏此时锁屏界面下方图标会被遮住 * New upstream release.
* 需求号:无 * debian/control: bump standards-version to 4.5.0.
* 其他修改说明:无
-- liudun <liudun@kylinos.cn> Wed, 28 Jun 2023 15:05:12 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Wed, 12 Aug 2020 12:01:14 +0000
ukui-screensaver (4.0.0.0-ok3~0608) yangtze; urgency=medium ukui-screensaver (2.1.1-1) unstable; urgency=medium
* BUG号 * New upstream bugfix release:
* 需求号:无 - Fix that long press the enter key will cause the crash.
* 其他修改说明:处理编译依赖问题 - Set default face to avoid empty frame.
-- Yang Min <yangmin@kylinos.cn> Thu, 08 Jun 2023 17:03:13 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Mon, 13 Apr 2020 16:33:05 +0800
ukui-screensaver (4.0.0.0-ok3~0602) yangtze; urgency=medium ukui-screensaver (2.1.0-1) unstable; urgency=medium
* BUG号I73TLX 修复网络图标显示异常的问题 * New upstream bugfix release.
* 需求号:无 - Fix the problem that the on-screen keyboard
* 其他修改说明:无 is displayed incorrectly when dual screen.
- Fix the issue that the second-user cannot
use biometrics when switching users to lock the screen.
- Fix the lock screen issue when root user switched tty
back and forth.
- Keep lock screen stays on top.
- Fix that in extended mode, login interface cannot be switched
between two monitors with the mouse.
* Fix the problem that the first user could not lock
the screen when logging in two users at the same time
by user switching.
* debian:
- Bump standards-vertion to 4.5.0.
- Remove the missing file from copyright.
-- Yang Min <yangmin@kylinos.cn> Fri, 02 Jun 2023 16:23:59 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Thu, 26 Mar 2020 21:19:04 +0800
ukui-screensaver (4.0.0.0-ok2~0518) yangtze; urgency=medium ukui-screensaver (2.0.10-1) unstable; urgency=medium
* BUG号I72EWI锁屏界面点击切换用户回来后输入框不输入文字时显示密码多了个冒号 * New upstream release.
I728TE【控制面板】中文模式下在个性化屏保界面悬浮屏保预览界面提示语为英文且进入屏保提示语也为英文 * debian/{compat,control}
* 需求号:无 - use debhelper-compat, bump to compat level version 12.
* 其他修改说明:无 * debian/control:
- Bump standards-version to 4.4.1. No changes needed.
-- Yang Min <yangmin@kylinos.cn> Thu, 18 May 2023 10:24:00 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Wed, 11 Dec 2019 09:06:24 +0800
ukui-screensaver (4.0.0.0-ok1~0426) yangtze; urgency=medium ukui-screensaver (2.0.9-0ubuntu1) eoan; urgency=medium
* BUG号 137546 【RISC-V】【控制面板】无法更改屏幕缩放 * Bugfix only:
* 需求号:无 - Don't lock when in live session. (LP: #1842855)
* 其他修改说明:无 - Fix the wrong background. (LP: #1836292)
- Fix the wrong path of ukui-screensaver.menu.
- Fix the errors when running Kydroid.
- Fix the focus issues.
-- Yang Min <yangmin@kylinos.cn> Wed, 26 Apr 2023 19:49:20 +0800 -- handsome_feng <jianfengli@ubuntukylin.com> Mon, 07 Oct 2019 20:10:00 +0800
ukui-screensaver (3.22.1.3-ok11~0412) yangtze; urgency=medium ukui-screensaver (2.0.7-1) unstable; urgency=medium
* BUG号I5XFFQ 锁屏登入界面无键盘图标,无实体键盘时无法输入 [ Liu Yuanpeng ]
* 需求号:无 * Set background widget on top. (LP: #1828955)
* 其他修改说明:无 * Set default background color. (LP: #1828982)
* Fix that sometimes can't enter password.
-- Yang Min <yangmin@kylinos.cn> Wed, 12 Apr 2023 14:48:36 +0800 [ handsome_feng ]
* Bump standards-vertion to 4.4.0.
* Drop mate-session-manager.
ukui-screensaver (3.22.1.3-ok10~0412) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Wed, 14 Aug 2019 09:04:48 +0800
* BUG号136797 【虚拟机】【virtualbox】【锁屏】锁屏后锁屏页面时间与头像显示未对齐登录页面正常 ukui-screensaver (2.0.6-0ubuntu1) disco; urgency=medium
I5M3SK 内存泄露
* 需求号:无
* 其他修改说明:无
-- Yang Min <yangmin@kylinos.cn> Wed, 12 Apr 2023 13:40:10 +0800 * Bugfix only:
- Fix the bug that the screensaver is still activated when
sessionIdleOption is unchecked.
ukui-screensaver (3.22.1.3-ok9~0323) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Fri, 12 Apr 2019 14:32:26 +0800
* BUG号I65B7Q 【次要】【系统登录】登录界面tab后esc键位无法回复登录界面默认显示 ukui-screensaver (2.0.5-0ubuntu1) disco; urgency=medium
* 需求号:无
* 其他修改说明:无
-- Yang Min <yangmin@kylinos.cn> Thu, 23 Mar 2023 09:35:33 +0800 * Bugfix only:
- Fix the wrong activated condition. (LP: #1822037)
ukui-screensaver (3.22.1.3-ok8~0314) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Thu, 28 Mar 2019 16:38:31 +0800
* BUG号 ukui-screensaver (2.0.4-1) experimental; urgency=medium
* 需求号:无
* 其他修改说明:更新屏保语录
-- Yang Min <yangmin@kylinos.cn> Tue, 14 Mar 2023 15:25:34 +0800 * Add /etc/pam.d/ukui-screensaver-qt.
* Generate dbus adaptor in CMake file.
* Bugfix: failed to switch to biometric authentication if no default device.
* Bugfix: stop authentication before suspend and start it after wake up.
* Bugfix: not activated when idel-activation-enabled is false.
ukui-screensaver (3.22.1.3-ok7~0109) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Fri, 22 Mar 2019 11:38:03 +0800
* BUG号 161081 【设计】ukui屏保格言替换文本 ukui-screensaver (2.0.3-1) unstable; urgency=medium
* 需求号:无
* 其他修改说明:无
-- Yang Min <yangmin@kylinos.cn> Mon, 09 Jan 2023 20:58:42 +0800 * Change UI.
* Add virtual keyboard.
* Add button for switching user.
* Remove Xext dependency.
* Auto retry if identify failed.
* Set the button's cursor to PointingHand.
* Add waiting movie after respond.
* Show black if the saver's path doesn't exist.
ukui-screensaver (3.22.1.3-ok6~1230) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Sat, 05 Jan 2019 16:10:25 +0800
* BUG号131228 【wayland】【控制面板】【显示器】【锁屏】扩展模式下锁屏仅一个屏幕有锁屏壁纸 ukui-screensaver (2.0.2-1) unstable; urgency=medium
* 需求号:无
* 其他修改说明:修复锁屏界面插拔电源均直接进入系统桌面问题
-- Yang Min <yangmin@kylinos.cn> Fri, 30 Dec 2022 15:27:42 +0800 * Add fr.po, pt.po, ru.po.
ukui-screensaver (3.22.1.3-ok5~1208) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Tue, 23 Oct 2018 14:14:18 +0800
* BUG号 ukui-screensaver (2.0.1-1) UNRELEASED; urgency=medium
* 需求号Task#123734 子 openkylin网络插件化适配 / openkylin网络插件化适配-登录锁屏
-- Yang Min <yangmin@kylinos.cn> Thu, 08 Dec 2022 14:39:04 +0800 * Update translation.
* Change Architecture to any.
* New design implemneted with Qt5.
ukui-screensaver (3.22.1.3-ok3~1101) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Sat, 29 Sep 2018 17:01:12 +0800
* BUG号 ukui-screensaver (1.1.2-1) UNRELEASED; urgency=medium
* 需求号Task#114869 【登录锁屏】增加登录、锁屏状态显示
-- Yang Min <yangmin@kylinos.cn> Mon, 24 Oct 2022 11:13:26 +0800 * Set object name of auth_prompt_entry.
ukui-screensaver (3.1.1.34update1-ok8) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Tue, 26 Jun 2018 16:10:33 +0800
* BUG号132979 【用户反馈】【锁屏】系统不操作等待5分钟必进入锁屏锁屏同步新的逻辑跟随屏保设置 ukui-screensaver (1.1.1-1) UNRELEASED; urgency=medium
* 需求号:无
* 其他修改说明:无
-- Yang Min <yangmin@kylinos.cn> Thu, 11 Aug 2022 10:08:54 +0800 * Fix a translation file typo
* Add "Modified by:" to three files
ukui-screensaver (3.1.1.34update1-ok7.1) yangtze; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Sat, 17 Mar 2018 14:01:48 +0800
* BUG号 129308 【网络】输入密码界面点击网络连接,网络图标显示错误,显示的是未连接状态 ukui-screensaver (1.1.0-1) UNRELEASED; urgency=medium
* 需求号:无
* 其他修改说明:无
-- Yang Min <yangmin@kylinos.cn> Wed, 20 Jul 2022 19:03:44 +0800 * Optimize the lock-dialog rendering process.
* Remove frame shadow from the lock-dialog.
* Add CSS stylesheets to the unlock button.
* Migrate gtk-2.0 to gtk-3.0.
* Update translation files.
ukui-screensaver (3.1.1.34update1-ok6) yangte; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Tue, 27 Feb 2018 15:41:35 +0800
* fix bug#128103 锁屏后无法通过正确密码进入系统 ukui-screensaver (1.0.3-1) UNRELEASED; urgency=medium
-- liuyuanpeng <liuyuanpeng@kylinos.cn> Wed, 20 Jul 2022 17:14:17 +0800 * [Fixed] screensaver-preferences can't preview "Blank Screen" correctly.
* [Improved] Change the unlock arrow to button.
* [Improved] Set the font style of username label.
ukui-screensaver (3.1.1.34update1-ok5) yangte; urgency=medium -- handsome_feng <jianfengli@ubuntukylin.com> Wed, 13 Sep 2017 09:14:54 +0800
* fix bug#125395 【wayland】【锁屏】在锁屏界面可以使用快捷键调出窗口或者进行窗口切换等操作 ukui-screensaver (1.0.2-2) unstable; urgency=medium
-- liuyuanpeng <liuyuanpeng@kylinos.cn> Tue, 19 Jul 2022 11:26:30 +0800 * Use tracker.d.o team address (Closes: #899718)
ukui-screensaver (3.1.1.34update1-ok4) yangte; urgency=medium -- Aron Xu <aron@debian.org> Mon, 09 Jul 2018 17:09:48 +0800
* 新增屏保插件wayland下使用加载插件的方式加载屏保 ukui-screensaver (1.0.2-1) unstable; urgency=medium
-- liuyuanpeng <liuyuanpeng@kylinos.cn> Mon, 18 Jul 2022 16:25:25 +0800 * Initial release (Closes: #872968)
ukui-screensaver (3.1.1.34update1-ok3~0716) yangtze; urgency=medium -- Aron Xu <aron@debian.org> Sat, 26 Aug 2017 15:26:45 +0800
* bug#128739 【wayland】【控制面板】【个性化】控制面板锁屏壁纸没有默认设置导致登录界面也不显示背景
* bug#128557 【wayland】【锁屏】点击锁屏恢复默认更换背景锁屏也一同更换
-- liuyuanpeng <liuyuanpeng@kylinos.cn> Sat, 16 Jul 2022 15:20:36 +0800
ukui-screensaver (3.1.1.34update1-ok2~0623) yangtze; urgency=medium
* Initial for openKylin.
* 修复锁屏窗口适配wayland置顶协议不生效问题
-- Xie Wei <xiewei@kylinos.cn> Thu, 19 May 2022 11:21:46 +0800

67
debian/control vendored
View File

@ -4,48 +4,51 @@ Priority: optional
Maintainer: Kylin Team <team+kylin@tracker.debian.org> Maintainer: Kylin Team <team+kylin@tracker.debian.org>
Uploaders: Aron Xu <aron@debian.org>, Uploaders: Aron Xu <aron@debian.org>,
handsome_feng <jianfengli@ubuntukylin.com> handsome_feng <jianfengli@ubuntukylin.com>
Build-Depends: debhelper-compat (= 12), Build-Depends: cmake (>=2.6),
cmake (>=2.6), debhelper-compat (= 13),
qtbase5-dev, kylin-nm-plugin,
libqt5x11extras5-dev, libavcodec-dev,
libpam0g-dev, libavformat-dev,
qttools5-dev,
qttools5-dev-tools,
libglib2.0-dev, libglib2.0-dev,
libgsettings-qt-dev,
libimlib2-dev,
# libinput-dev,
libkf5networkmanagerqt-dev,
libkf5screen-dev,
libkf5wayland-dev,
libkf5windowsystem-dev,
libkylin-nm-base (>=3.20.0.9-0k1),
libkysdk-system-dev,
liblayershellqtinterface-dev,
libmatemixer-dev,
libnm-dev,
libopencv-dev, libopencv-dev,
libpam0g-dev,
libqt5svg5-dev,
libqt5x11extras5-dev,
libukui-log4qt-dev,
# libukuiinputgatherclient-dev,
libx11-dev, libx11-dev,
libxtst-dev, libxtst-dev,
libqt5svg5-dev, qtbase5-dev,
libkylin-nm-base (>=3.20.0.9-0k1), qtmultimedia5-dev,
libnm-dev, qttools5-dev,
libkf5networkmanagerqt-dev, qttools5-dev-tools,
kylin-nm-plugin, # ukui-input-gather (>=1.0.0.2)
libkf5wayland-dev, Standards-Version: 4.6.1.0
libkf5screen-dev,
libgsettings-qt-dev,
libkf5windowsystem-dev,
libmatemixer-dev,
libimlib2-dev,
libukui-log4qt-dev,
libkysdk-sysinfo-dev (>> 1.1.0kylin1),
ukui-input-gather (>=1.0.0.2),
libinput-dev,
libukuiinputgatherclient-dev,
liblayershellqtinterface-dev
Standards-Version: 4.5.0
Rules-Requires-Root: no Rules-Requires-Root: no
Homepage: https://www.github.com/ukui/ukui-screensaver Homepage: https://gitee.com/openkylin/ukui-screensaver
Vcs-Git: https://github.com/ukui/ukui-screensaver.git Vcs-Git: https://gitee.com/openkylin/ukui-screensaver.git
Vcs-Browser: https://github.com/ukui/ukui-screensaver Vcs-Browser: https://gitee.com/openkylin/ukui-screensaver
Package: ukui-screensaver Package: ukui-screensaver
Architecture: any Architecture: any
Depends: ethtool, Depends: ethtool,
mate-desktop-common, layer-shell-qt,
ukui-session-manager,
libpam-biometric(>=3.20.0.10), libpam-biometric(>=3.20.0.10),
ukui-input-gather(>=1.0.0.2), mate-desktop-common,
layer-shell-qt, # ukui-input-gather(>=1.0.0.2),
ukui-session-manager,
${misc:Depends}, ${misc:Depends},
${shlibs:Depends} ${shlibs:Depends}
Replaces: ukui-screensaver-common (<< 2.0.0) Replaces: ukui-screensaver-common (<< 2.0.0)

Some files were not shown because too many files have changed in this diff Show More