!6 fix repair bug

From: @tanyulong2021
Reviewed-by: @pei-jiankang
Signed-off-by: @pei-jiankang
This commit is contained in:
openeuler-ci-bot 2021-11-09 06:35:35 +00:00 committed by Gitee
commit 4ab58acfca
2 changed files with 36 additions and 1 deletions

30
0004-fix-repair-bug.patch Normal file
View File

@ -0,0 +1,30 @@
From 1eed1d15318d93969903cf03ada0dec6633c6f43 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Mon, 1 Nov 2021 10:40:37 +0800
Subject: [PATCH] fix repair bug
---
ukui-bluetooth/main/featureswidget.cpp | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/ukui-bluetooth/main/featureswidget.cpp b/ukui-bluetooth/main/featureswidget.cpp
index ff3f623..171506e 100644
--- a/ukui-bluetooth/main/featureswidget.cpp
+++ b/ukui-bluetooth/main/featureswidget.cpp
@@ -95,12 +95,7 @@ FeaturesWidget::FeaturesWidget(QWidget *parent)
// }
// }
- bool value;
- if(value != settings->get("switch").toBool()){
- Turn_on_or_off_bluetooth(value);
- }
- if (value = settings->get("switch").toBool() )
-
+ Turn_on_or_off_bluetooth(settings->get("switch").toBool());
if(File_save_path.isEmpty()){
settings->set("file-save-path",QVariant::fromValue(QDir::homePath()));
--
2.30.0

View File

@ -2,7 +2,7 @@
Name: ukui-bluetooth
Version: 1.0.0
Release: 4
Release: 5
Summary: Advanced ukui bluetooth
License: GPLv2+
URL: http://www.ukui.org
@ -11,6 +11,7 @@ Source0: %{name}-%{version}.tar.gz
patch0: 0001-fix-Bluetooth-pulled-up-by-the-session-manager-and-exits-abnormally.patch
patch1: 0002-fix-ukui-bluetooth-will-have-a-segfault-when-times-out.patch
patch2: 0003-fix-restart-the-system-Bluetooth-core-dump.patch
patch3: 0004-fix-repair-bug.patch
BuildRequires: gsettings-qt-devel
BuildRequires: glib2-devel
@ -42,6 +43,7 @@ Simple bluetooth tool for ukui desktop environment
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
mkdir build && cd build
@ -77,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Nov 1 2021 tanyulong <tanyulong@kylinos.cn> - 1.0.0-5
- add patch: 0004-fix-repair-bug.patch
* Mon Nov 1 2021 tanyulong <tanyulong@kylinos.cn> - 1.0.0-4
- After using rfkill to restart the soft connection, restart the system Bluetooth core dump