diff --git a/src/backthread.cpp b/src/backthread.cpp index 83f9648c..078bf21a 100644 --- a/src/backthread.cpp +++ b/src/backthread.cpp @@ -236,6 +236,8 @@ void BackThread::execConnLan(QString connName) syslog(LOG_DEBUG, "In function execConnLan, wired net state is: %d", execGetIface()->lstate); emit connDone(0); } else { + qDebug()<<"connect wired network failed for without wired cable plug in."; + syslog(LOG_DEBUG, "connect wired network failed for without wired cable plug in."); emit connDone(1); } diff --git a/src/kylin-dbus-interface.cpp b/src/kylin-dbus-interface.cpp index b3a72262..2e069af7 100644 --- a/src/kylin-dbus-interface.cpp +++ b/src/kylin-dbus-interface.cpp @@ -415,7 +415,7 @@ void KylinDBus::initConnectionInfo() // qDebug()<<" "; - //获取当前wifi是否连接 + //获取当前wifi的开关状态 QDBusReply m_result = interface.call("Get", "org.freedesktop.NetworkManager", "WirelessEnabled"); qDebug()<<"debug: *****初始的无线网络开关状态是: "<onBtnWifiClicked(1); //打开wifi开关 + qDebug()<<"receive a signal to turn on wifi switch from control-center"; + syslog(LOG_DEBUG, "receive a signal to turn on wifi switch from control-center"); } else { mw->onBtnWifiClicked(2); //关闭wifi开关 + qDebug()<<"receive a signal to turn off wifi switch from control-center"; + syslog(LOG_DEBUG, "receive a signal to turn off wifi switch from control-center"); } } }); diff --git a/src/main.cpp b/src/main.cpp index 9414d983..d6195efd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,16 +25,24 @@ #include #include #include +#include #define LOG_IDENT "ukui_kylin_nm" int main(int argc, char *argv[]) { - QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + //QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication a(argc, argv); + if (QApplication::desktop()->width() >= 2560) { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); +#endif + } + openlog(LOG_IDENT, LOG_NDELAY | LOG_NOWAIT | LOG_PID, LOG_USER); syslog(LOG_DEBUG, "Kylin Network Manager Is Already Launched"); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d3b4bdae..0c233dc6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1135,6 +1135,8 @@ void MainWindow::onBtnWifiClicked(int flag) QString txt(tr("please insert the wireless network adapter")); objKyDBus->showDesktopNotify(txt); + qDebug()<<"please insert the wireless network adapter"; + syslog(LOG_DEBUG, "please insert the wireless network adapter"); //QString cmd = "export LANG='en_US.UTF-8';export LANGUAGE='en_US';notify-send '" + txt + "' -t 3800"; //int status = system(cmd.toUtf8().data()); //if (status != 0){ syslog(LOG_ERR, "execute 'notify-send' in function 'onBtnWifiClicked' failed");} @@ -2339,10 +2341,12 @@ void MainWindow::onExternalWifiSwitchChange(bool wifiEnabled) if (!is_stop_check_net_state) { is_stop_check_net_state = 1; if (wifiEnabled) { - qDebug()<<"debug: ccccccccccccccccccccccccccccccccc"; + qDebug()<<"debug: external wifi switch turn on"; + syslog(LOG_DEBUG, "debug: external wifi switch turn on"); QTimer::singleShot(4*1000, this, SLOT(onExternalWifiChange() )); } else { - qDebug()<<"debug: ddddddddddddddddddddddddddddddddd"; + qDebug()<<"debug: external wifi switch turn off"; + syslog(LOG_DEBUG, "debug: external wifi switch turn off"); QTimer::singleShot(3*1000, this, SLOT(onExternalWifiChange() )); } }