From beaa2a77733e93f141706a1ac9ef70f793c9a112 Mon Sep 17 00:00:00 2001 From: chenlelin Date: Mon, 25 Jan 2021 09:29:11 +0800 Subject: [PATCH] Remove function to judge strict mode --- debian/control | 1 - kylin-nm.pro | 7 ++++--- src/mainwindow.cpp | 34 ++++++++++++++++++---------------- src/mainwindow.h | 6 +++--- src/utils.h | 4 ++-- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/debian/control b/debian/control index 9fdf0c8f..d2e11f86 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,6 @@ Build-Depends: debhelper-compat (= 12), libkf5windowsystem-dev, libx11-dev, libqt5svg5-dev, - libkysec-dev, Standards-Version: 4.5.0 Rules-Requires-Root: no Homepage: https://github.com/ukui/kylin-nm diff --git a/kylin-nm.pro b/kylin-nm.pro index 6655943e..2873fd8f 100644 --- a/kylin-nm.pro +++ b/kylin-nm.pro @@ -15,11 +15,12 @@ LANGUAGE = C++ CONFIG += c++14 CONFIG += qt warn_on CONFIG += release -CONFIG += link_pkgconfig +#CONFIG += link_pkgconfig -PKGCONFIG += glib-2.0 gio-2.0 gsettings-qt +#PKGCONFIG += glib-2.0 gio-2.0 gsettings-qt -LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lkysec +LIBS += -L/usr/lib/ -lgsettings-qt -lX11 +#LIBS += -lkysec target.path = /usr/bin target.source += $$TARGET diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 123d9501..8c052ee7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2097,22 +2097,24 @@ QString MainWindow::getMacByUuid(QString uuidName) void MainWindow::on_btnAdvConf_clicked() { - if (!kysec_is_disabled() && kysec_get_3adm_status()) { - //三权分立启用的操作 - qDebug() << "三权分立启用的操作------>"; - QMessageBox msgBox; - msgBox.setWindowTitle(QObject::tr("kylin-nm")); - msgBox.setIcon(QMessageBox::Warning); - msgBox.setText(QObject::tr("Insufficient permissions")); - msgBox.addButton(QMessageBox::Ok); - msgBox.button(QMessageBox::Ok)->setText(QObject::tr("OK")); - msgBox.exec(); - } else { - //三权分立未启用的操作 - qDebug() << "三权分立未启用的操作"; - QProcess *qprocess = new QProcess(this); - qprocess->start("nm-connection-editor &"); - } +// if (!kysec_is_disabled() && kysec_get_3adm_status()) { +// //三权分立启用的操作 +// qDebug() << "三权分立启用的操作------>"; +// QMessageBox msgBox; +// msgBox.setWindowTitle(QObject::tr("kylin-nm")); +// msgBox.setIcon(QMessageBox::Warning); +// msgBox.setText(QObject::tr("Insufficient permissions")); +// msgBox.addButton(QMessageBox::Ok); +// msgBox.button(QMessageBox::Ok)->setText(QObject::tr("OK")); +// msgBox.exec(); +// } else { +// //三权分立未启用的操作 +// qDebug() << "三权分立未启用的操作"; +// QProcess *qprocess = new QProcess(this); +// qprocess->start("nm-connection-editor &"); +// } + QProcess *qprocess = new QProcess(this); + qprocess->start("nm-connection-editor &"); return; } diff --git a/src/mainwindow.h b/src/mainwindow.h index f9c7151c..c8e31196 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -63,9 +63,9 @@ #include #include #include -#include -#include -#include +//#include +//#include +//#include #define W_LEFT_AREA 41 #define W_VERTICAL_LINE 1 //左边竖线宽度 diff --git a/src/utils.h b/src/utils.h index a27dbd8d..331f4347 100644 --- a/src/utils.h +++ b/src/utils.h @@ -41,7 +41,7 @@ /* qt会将glib里的signals成员识别为宏,所以取消该宏 * 后面如果用到signals时,使用Q_SIGNALS代替即可 - **/ + * #ifdef signals #undef signals #endif @@ -50,7 +50,7 @@ extern "C" { #include #include } - + */ /////////////////////////////////////////////////////////////////////////////// // The Utils class, used to do some assist function