update kylin-nm.pro and rules
This commit is contained in:
parent
27f944359c
commit
ab57c80aa0
|
@ -19,6 +19,7 @@
|
||||||
#include "backthread.h"
|
#include "backthread.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
#include "kylin-network-interface.h"
|
#include "kylin-network-interface.h"
|
||||||
#include "backthread.h"
|
#include "backthread.h"
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
extern QString llname, lwname;
|
extern QString llname, lwname;
|
||||||
|
|
||||||
ConfForm::ConfForm(QWidget *parent) :
|
ConfForm::ConfForm(QWidget *parent) :
|
||||||
|
|
|
@ -4,6 +4,9 @@ kylin-nm (1.2.0-1) unstable; urgency=medium
|
||||||
* debian/control:
|
* debian/control:
|
||||||
- Bump standards-version to 4.5.0.
|
- Bump standards-version to 4.5.0.
|
||||||
|
|
||||||
|
[ lixiang ]
|
||||||
|
* update kylin-nm.pro and rules.
|
||||||
|
|
||||||
-- handsome_feng <jianfengli@ubuntukylin.com> Tue, 25 Feb 2020 14:12:29 +0800
|
-- handsome_feng <jianfengli@ubuntukylin.com> Tue, 25 Feb 2020 14:12:29 +0800
|
||||||
|
|
||||||
kylin-nm (1.0.4-1) unstable; urgency=medium
|
kylin-nm (1.0.4-1) unstable; urgency=medium
|
||||||
|
|
|
@ -3,10 +3,15 @@ Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Kylin Team <team+kylin@tracker.debian.org>
|
Maintainer: Kylin Team <team+kylin@tracker.debian.org>
|
||||||
Uploaders: handsome_feng <jianfengli@ubuntukylin.com>
|
Uploaders: handsome_feng <jianfengli@ubuntukylin.com>
|
||||||
Build-Depends: debhelper-compat (= 12),
|
Build-Depends: debhelper-compat (>= 12),
|
||||||
qtbase5-dev,
|
qtbase5-dev,
|
||||||
|
qt5-qmake,
|
||||||
|
qtchooser,
|
||||||
|
qtscript5-dev,
|
||||||
|
qttools5-dev-tools,
|
||||||
|
qtbase5-dev-tools,
|
||||||
libnotify-bin,
|
libnotify-bin,
|
||||||
libqt5x11extras5-dev (>= 5.11.1-2),
|
libqt5x11extras5-dev,
|
||||||
Standards-Version: 4.5.0
|
Standards-Version: 4.5.0
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
Homepage: https://github.com/ukui/kylin-nm
|
Homepage: https://github.com/ukui/kylin-nm
|
||||||
|
@ -15,8 +20,7 @@ Vcs-Browser: https://github.com/ukui/kylin-nm
|
||||||
|
|
||||||
Package: kylin-nm
|
Package: kylin-nm
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: libqt5x11extras5 (>= 5.11.1-2),
|
Depends: network-manager (>=1.12.4),
|
||||||
network-manager (>=1.12.4),
|
|
||||||
libnotify-bin,
|
libnotify-bin,
|
||||||
${shlibs:Depends},
|
${shlibs:Depends},
|
||||||
${misc:Depends}
|
${misc:Depends}
|
||||||
|
|
|
@ -1,8 +1,30 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
# Uncomment this to turn on verbose mode.
|
|
||||||
#export DH_VERBOSE=1
|
export QT_SELECT=5
|
||||||
export QT_SELECT := qt5
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
|
QMAKE_OPTS = DEFINES+=NO_DEBUG_ON_CONSOLE
|
||||||
|
MAKE_OPTS = PREFIX=/usr QMAKE=qmake LRELEASE=lrelease QMAKE_OPTS="$(QMAKE_OPTS)"
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
QT_SELECT=qt5 dh_auto_configure \
|
||||||
|
-- "QMAKE_CXXFLAGS=$(CFLAGS)" \
|
||||||
|
kylin-nm.pro
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
dh_install
|
||||||
|
|
||||||
|
override_dh_missing:
|
||||||
|
dh_missing --fail-missing
|
||||||
|
|
||||||
|
override_dh_auto_clean:
|
||||||
|
[ ! -d .moc ] || $(RM) -r .moc
|
||||||
|
[ ! -d .obj ] || $(RM) -r .obj
|
||||||
|
[ ! -d .ui ] || $(RM) -r .ui
|
||||||
|
[ ! -f Makefile ] || dh_auto_clean
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
dh_auto_build -- $(MAKE_OPTS)
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <linux/route.h>
|
#include <linux/route.h>
|
||||||
#include <netinet/ether.h>
|
#include <netinet/ether.h>
|
||||||
#include <net/ethernet.h>
|
#include <net/ethernet.h>
|
||||||
|
|
15
kylin-nm.pro
15
kylin-nm.pro
|
@ -9,7 +9,7 @@ QT += core gui x11extras dbus
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
TARGET = kylin-nm
|
TARGET = kylin-nm
|
||||||
|
TEMPLATE = app
|
||||||
#CONFIG += link_pkgconfig
|
#CONFIG += link_pkgconfig
|
||||||
#PKGCONFIG += libnm glib-2.0 gio-2.0 dbus-glib-1
|
#PKGCONFIG += libnm glib-2.0 gio-2.0 dbus-glib-1
|
||||||
#PKGCONFIG += Qt5Svg
|
#PKGCONFIG += Qt5Svg
|
||||||
|
@ -23,8 +23,6 @@ desktop.files = kylin-nm.desktop
|
||||||
INSTALLS += target \
|
INSTALLS += target \
|
||||||
desktop
|
desktop
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
|
@ -36,6 +34,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
QMAKE_CPPFLAGS *= $(shell dpkg-buildflags --get CPPFLAGS)
|
||||||
|
QMAKE_CFLAGS *= $(shell dpkg-buildflags --get CFLAGS)
|
||||||
|
QMAKE_CXXFLAGS *= $(shell dpkg-buildflags --get CXXFLAGS)
|
||||||
|
QMAKE_LFLAGS *= $(shell dpkg-buildflags --get LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
|
@ -105,5 +108,11 @@ FORMS += \
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
nmqrc.qrc
|
nmqrc.qrc
|
||||||
|
|
||||||
|
unix {
|
||||||
|
UI_DIR = .ui
|
||||||
|
MOC_DIR = .moc
|
||||||
|
OBJECTS_DIR = .obj
|
||||||
|
}
|
||||||
|
|
||||||
TRANSLATIONS = translations/kylin-nm_zh_CN.ts \
|
TRANSLATIONS = translations/kylin-nm_zh_CN.ts \
|
||||||
translations/kylin-nm_bo.ts
|
translations/kylin-nm_bo.ts
|
||||||
|
|
|
@ -96,7 +96,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0.08);}");
|
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0.08);}");
|
||||||
btnAddNet->setFocusPolicy(Qt::NoFocus);
|
btnAddNet->setFocusPolicy(Qt::NoFocus);
|
||||||
btnAddNet->show();
|
btnAddNet->show();
|
||||||
connect(btnAddNet,SIGNAL(clicked()),this,SLOT(on_btnAddNet_clicked()));
|
connect(btnAddNet,SIGNAL(clicked()),this,SLOT(onBtnAddNetClicked()));
|
||||||
|
|
||||||
scrollAreal = new QScrollArea(ui->centralWidget);
|
scrollAreal = new QScrollArea(ui->centralWidget);
|
||||||
scrollAreal->move(41, 158);
|
scrollAreal->move(41, 158);
|
||||||
|
@ -1034,7 +1034,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
||||||
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0.08);}");
|
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0.08);}");
|
||||||
btnAddNet->setFocusPolicy(Qt::NoFocus);
|
btnAddNet->setFocusPolicy(Qt::NoFocus);
|
||||||
btnAddNet->show();
|
btnAddNet->show();
|
||||||
connect(btnAddNet,SIGNAL(clicked()),this,SLOT(on_btnAddNet_clicked()));
|
connect(btnAddNet,SIGNAL(clicked()),this,SLOT(onBtnAddNetClicked()));
|
||||||
|
|
||||||
// 清空wifi列表
|
// 清空wifi列表
|
||||||
wifiListWidget = new QWidget(scrollAreaw);
|
wifiListWidget = new QWidget(scrollAreaw);
|
||||||
|
@ -1476,7 +1476,7 @@ void MainWindow::on_btnWifiList_clicked()
|
||||||
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0.08);}");
|
"QPushButton:Pressed{border-radius:4px;background-color:rgba(255,255,255,0.08);}");
|
||||||
btnAddNet->setFocusPolicy(Qt::NoFocus);
|
btnAddNet->setFocusPolicy(Qt::NoFocus);
|
||||||
btnAddNet->show();
|
btnAddNet->show();
|
||||||
connect(btnAddNet,SIGNAL(clicked()),this,SLOT(on_btnAddNet_clicked()));
|
connect(btnAddNet,SIGNAL(clicked()),this,SLOT(onBtnAddNetClicked()));
|
||||||
|
|
||||||
// 清空wifi列表
|
// 清空wifi列表
|
||||||
wifiListWidget = new QWidget(scrollAreaw);
|
wifiListWidget = new QWidget(scrollAreaw);
|
||||||
|
@ -2265,7 +2265,7 @@ void MainWindow::on_btnHotspotState()
|
||||||
is_hot_sopt_on = 0;
|
is_hot_sopt_on = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btnAddNet_clicked()
|
void MainWindow::onBtnAddNetClicked()
|
||||||
{
|
{
|
||||||
QApplication::setQuitOnLastWindowClosed(false);
|
QApplication::setQuitOnLastWindowClosed(false);
|
||||||
DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, this);
|
DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, this);
|
||||||
|
|
|
@ -105,6 +105,8 @@ public:
|
||||||
|
|
||||||
QString currSelNetName = ""; //当前ScrollArea中选中的网络名称
|
QString currSelNetName = ""; //当前ScrollArea中选中的网络名称
|
||||||
|
|
||||||
|
void on_btnNetList_clicked(int flag=0);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void onPhysicalCarrierChanged(bool flag);
|
void onPhysicalCarrierChanged(bool flag);
|
||||||
void onCarrierUpHandle();
|
void onCarrierUpHandle();
|
||||||
|
@ -196,7 +198,6 @@ private slots:
|
||||||
|
|
||||||
void on_btnNet_clicked();
|
void on_btnNet_clicked();
|
||||||
void on_btnWifi_clicked();
|
void on_btnWifi_clicked();
|
||||||
void on_btnNetList_clicked(int flag=0);
|
|
||||||
void on_btnWifiList_clicked();
|
void on_btnWifiList_clicked();
|
||||||
|
|
||||||
void getLanListDone(QStringList slist);
|
void getLanListDone(QStringList slist);
|
||||||
|
@ -234,7 +235,7 @@ private slots:
|
||||||
void iconStep();
|
void iconStep();
|
||||||
void on_btnFlyMode_clicked();
|
void on_btnFlyMode_clicked();
|
||||||
|
|
||||||
void on_btnAddNet_clicked();
|
void onBtnAddNetClicked();
|
||||||
signals:
|
signals:
|
||||||
void deleteRedundantNet();
|
void deleteRedundantNet();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "networkspeed.h"
|
#include "networkspeed.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
NetworkSpeed::NetworkSpeed(QObject *parent) :QObject(parent)
|
NetworkSpeed::NetworkSpeed(QObject *parent) :QObject(parent)
|
||||||
{
|
{
|
||||||
|
@ -9,10 +10,10 @@ int NetworkSpeed::getCurrentDownloadRates(char *netname, long *save_rate, long *
|
||||||
{
|
{
|
||||||
FILE * net_dev_file; //文件指针
|
FILE * net_dev_file; //文件指针
|
||||||
char buffer[1024]; //文件中的内容暂存在字符缓冲区里
|
char buffer[1024]; //文件中的内容暂存在字符缓冲区里
|
||||||
size_t bytes_read; //实际读取的内容大小
|
//size_t bytes_read; //实际读取的内容大小
|
||||||
char * match; //用以保存所匹配字符串及之后的内容
|
char * match; //用以保存所匹配字符串及之后的内容
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
int i = 0;
|
//int i = 0;
|
||||||
char tmp_value[128];
|
char tmp_value[128];
|
||||||
|
|
||||||
if((NULL == netname)||(NULL == save_rate)||(NULL == tx_rate)){
|
if((NULL == netname)||(NULL == save_rate)||(NULL == tx_rate)){
|
||||||
|
@ -39,7 +40,7 @@ int NetworkSpeed::getCurrentDownloadRates(char *netname, long *save_rate, long *
|
||||||
memset(tmp_value,0,sizeof(tmp_value));
|
memset(tmp_value,0,sizeof(tmp_value));
|
||||||
sscanf(match,"%s ",tmp_value);
|
sscanf(match,"%s ",tmp_value);
|
||||||
match = match + strlen(tmp_value);
|
match = match + strlen(tmp_value);
|
||||||
for(i=0;i<strlen(buffer);i++){
|
for(size_t i=0;i<strlen(buffer);i++){
|
||||||
if(0x20 == *match){
|
if(0x20 == *match){
|
||||||
match ++;
|
match ++;
|
||||||
} else{
|
} else{
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "backthread.h"
|
#include "backthread.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
DlgConnHidWifiWpa::DlgConnHidWifiWpa(int type, MainWindow *mainWindow, QWidget *parent) :
|
DlgConnHidWifiWpa::DlgConnHidWifiWpa(int type, MainWindow *mainWindow, QWidget *parent) :
|
||||||
isUsed(type),
|
isUsed(type),
|
||||||
|
|
Loading…
Reference in New Issue