!11 fix bug closing settings window causes the main process to exit 2
From: @hua_yadong Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
61234ee29d
@ -0,0 +1,144 @@
|
||||
From f70832dd27e37657c19b1d8002c460cfa034eb3c Mon Sep 17 00:00:00 2001
|
||||
From: huayadong <huayadong@kylinos.cn>
|
||||
Date: Tue, 7 Dec 2021 17:40:44 +0800
|
||||
Subject: [PATCH] xxxxxx
|
||||
|
||||
---
|
||||
debian/changelog | 6 ------
|
||||
debian/source/format | 2 +-
|
||||
src/confform.cpp | 10 +---------
|
||||
src/confform.h | 3 +--
|
||||
src/confform.ui | 3 ---
|
||||
src/mainwindow.cpp | 3 +--
|
||||
src/utils.cpp | 2 +-
|
||||
7 files changed, 5 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/debian/changelog b/debian/changelog
|
||||
index d0582f3..c4b66aa 100755
|
||||
--- a/debian/changelog
|
||||
+++ b/debian/changelog
|
||||
@@ -1,9 +1,3 @@
|
||||
-kylin-nm (3.0.1-1+1026) focal; urgency=medium
|
||||
-
|
||||
- * Daily build.
|
||||
-
|
||||
- -- liuliang <liuliang@ubuntukylin.com> Mon, 27 May 2019 15:48:18 +0800
|
||||
-
|
||||
kylin-nm (3.0.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bugfix release.
|
||||
diff --git a/debian/source/format b/debian/source/format
|
||||
index 89ae9db..163aaf8 100755
|
||||
--- a/debian/source/format
|
||||
+++ b/debian/source/format
|
||||
@@ -1 +1 @@
|
||||
-3.0 (native)
|
||||
+3.0 (quilt)
|
||||
diff --git a/src/confform.cpp b/src/confform.cpp
|
||||
index d62cbb4..f0c04ce 100755
|
||||
--- a/src/confform.cpp
|
||||
+++ b/src/confform.cpp
|
||||
@@ -30,7 +30,7 @@
|
||||
extern QString llname, lwname;
|
||||
|
||||
ConfForm::ConfForm(QWidget *parent) :
|
||||
- QDialog(parent),
|
||||
+ QWidget(parent),
|
||||
ui(new Ui::ConfForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -92,12 +92,6 @@ ConfForm::ConfForm(QWidget *parent) :
|
||||
// ui->btnCancel->setStyleSheet(btnOffQss);
|
||||
// ui->btnOk->setStyleSheet(btnOnQss);
|
||||
// ui->btnCreate->setStyleSheet(btnOnQss);
|
||||
- ui->leAddr->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
- ui->leName->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
- ui->leDns->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
- ui->leDns2->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
- ui->leGateway->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
-
|
||||
ui->lineUp->setStyleSheet(lineQss);
|
||||
ui->lineDown->setStyleSheet(lineQss);
|
||||
ui->lineUp->hide();
|
||||
@@ -154,7 +148,6 @@ void ConfForm::mousePressEvent(QMouseEvent *event)
|
||||
this->dragPos = event->globalPos();
|
||||
event->accept();
|
||||
}
|
||||
- return QDialog::mousePressEvent(event);
|
||||
}
|
||||
void ConfForm::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
@@ -166,7 +159,6 @@ void ConfForm::mouseMoveEvent(QMouseEvent *event)
|
||||
this->move(this->winPos - (this->dragPos - event->globalPos()));
|
||||
event->accept();
|
||||
}
|
||||
- return QDialog::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
//网络配置参数设置界面的显示内容
|
||||
diff --git a/src/confform.h b/src/confform.h
|
||||
index b40d2c2..e29cdd2 100755
|
||||
--- a/src/confform.h
|
||||
+++ b/src/confform.h
|
||||
@@ -25,14 +25,13 @@
|
||||
#include <QPoint>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
-#include <QDialog>
|
||||
#include <QListView>
|
||||
|
||||
namespace Ui {
|
||||
class ConfForm;
|
||||
}
|
||||
|
||||
-class ConfForm : public QDialog
|
||||
+class ConfForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
diff --git a/src/confform.ui b/src/confform.ui
|
||||
index a312a94..3b117a5 100755
|
||||
--- a/src/confform.ui
|
||||
+++ b/src/confform.ui
|
||||
@@ -13,9 +13,6 @@
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
- <property name="toolTip">
|
||||
- <string/>
|
||||
- </property>
|
||||
<widget class="QWidget" name="centralWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
|
||||
index 7d9bfdf..6461855 100755
|
||||
--- a/src/mainwindow.cpp
|
||||
+++ b/src/mainwindow.cpp
|
||||
@@ -1871,10 +1871,9 @@ void MainWindow::onBtnCreateNetClicked()
|
||||
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
ConfForm *m_cf = new ConfForm();
|
||||
- m_cf->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_cf->cbTypeChanged(3);
|
||||
m_cf->move(primaryGeometry.width() / 2 - m_cf->width() / 2, primaryGeometry.height() / 2 - m_cf->height() / 2);
|
||||
- m_cf->exec();
|
||||
+ m_cf->show();
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/utils.cpp b/src/utils.cpp
|
||||
index f5b2bd2..7821508 100755
|
||||
--- a/src/utils.cpp
|
||||
+++ b/src/utils.cpp
|
||||
@@ -83,7 +83,7 @@ void Utils::onRequestSendDesktopNotify(QString message)
|
||||
QList<QVariant> args;
|
||||
args<<(QCoreApplication::applicationName())
|
||||
<<((unsigned int) 0)
|
||||
- <<QString("/usr/share/icons/ukui-icon-theme-default/22x22/devices/network-wired.png")
|
||||
+ <<QString("qweq")
|
||||
<<tr("kylin network applet desktop message") //显示的是什么类型的信息
|
||||
<<message //显示的具体信息
|
||||
<<QStringList()
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: kylin-nm
|
||||
Version: 3.0.2
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Gui Applet tool for display and edit network simply
|
||||
License: GPL-3+
|
||||
URL: https://github.com/ukui/kylin-nm/
|
||||
@ -8,6 +8,7 @@ Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: fix-desktop-notification-window-show-error.patch
|
||||
Patch1: 0001-fix-bug-closing-settings-window-causes-the-main-proc.patch
|
||||
Patch2: Fix-bug-closing-the-settings-window-causes-the-main-process-to-exit-2.patch
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qtchooser
|
||||
@ -29,6 +30,7 @@ Requires: network-manager-applet
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-nm.pro
|
||||
@ -55,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/kylin-nm.1.gz
|
||||
|
||||
%changelog
|
||||
* Tue Dec 07 2021 huayadong <huayadong@kylinos.cn> - 3.0.2-5
|
||||
- add patch:Fix-bug-closing-the-settings-window-causes-the-main-process-to-exit-1104.patch
|
||||
|
||||
* Thu Oct 28 2021 douyan <douyan@kylinos.cn> - 3.0.2-4
|
||||
- fix bug closing settings window causes the main process to exit
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user