fix Bluetooth is pulled up by the session manager and exits abnormally
This commit is contained in:
parent
3c771314fc
commit
60657b8227
@ -0,0 +1,48 @@
|
|||||||
|
From 5163effc944fb312888b84ec6033c0ab19d4197a Mon Sep 17 00:00:00 2001
|
||||||
|
From: tanyulong <tanyulong@kylinos.cn>
|
||||||
|
Date: Fri, 29 Oct 2021 15:26:14 +0800
|
||||||
|
Subject: [PATCH] fix Bluetooth pulled up by the session manager and exits
|
||||||
|
abnormally
|
||||||
|
|
||||||
|
---
|
||||||
|
debian/control | 2 +-
|
||||||
|
ukui-bluetooth/main/featureswidget.cpp | 3 ++-
|
||||||
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/debian/control b/debian/control
|
||||||
|
index ca3fd8e..4f12e6c 100644
|
||||||
|
--- a/debian/control
|
||||||
|
+++ b/debian/control
|
||||||
|
@@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 9),
|
||||||
|
libxinerama-dev,
|
||||||
|
libxi-dev,
|
||||||
|
libxcursor-dev,
|
||||||
|
- libukui-log4qt-dev
|
||||||
|
+# libukui-log4qt-dev
|
||||||
|
# libkf5bluezqt6-dev
|
||||||
|
Standards-Version: 4.4.1
|
||||||
|
Homepage: https://github.com/supreme886/ukui-bluetooth
|
||||||
|
diff --git a/ukui-bluetooth/main/featureswidget.cpp b/ukui-bluetooth/main/featureswidget.cpp
|
||||||
|
index bec6773..300f51f 100644
|
||||||
|
--- a/ukui-bluetooth/main/featureswidget.cpp
|
||||||
|
+++ b/ukui-bluetooth/main/featureswidget.cpp
|
||||||
|
@@ -610,6 +610,7 @@ void FeaturesWidget::Turn_on_or_off_bluetooth(bool f)
|
||||||
|
if(p->error() == 0){
|
||||||
|
flag = true;
|
||||||
|
qDebug() << Q_FUNC_INFO << m_adapter->isPowered();
|
||||||
|
+ m_manager->setBluetoothBlocked(true);
|
||||||
|
// Connect_the_last_connected_device();
|
||||||
|
}else
|
||||||
|
qDebug() << "Failed to turn off Bluetooth:" << p->errorText();
|
||||||
|
@@ -894,7 +895,7 @@ void FeaturesWidget::adapterPoweredChanged(bool value)
|
||||||
|
if (value == true) {//开启
|
||||||
|
bluetooth_tray_icon->setIcon(QIcon::fromTheme("bluetooth-active-symbolic"));
|
||||||
|
bluetooth_tray_icon->show();
|
||||||
|
- Connect_the_last_connected_device();
|
||||||
|
+ //Connect_the_last_connected_device();
|
||||||
|
}else {//关闭
|
||||||
|
if(QIcon::hasThemeIcon("bluetooth-error"))
|
||||||
|
bluetooth_tray_icon->setIcon(QIcon::fromTheme("bluetooth-error"));
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
Name: ukui-bluetooth
|
Name: ukui-bluetooth
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Advanced ukui bluetooth
|
Summary: Advanced ukui bluetooth
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
patch0: 0001-fix-Bluetooth-pulled-up-by-the-session-manager-and-exits-abnormally.patch
|
||||||
|
|
||||||
BuildRequires: gsettings-qt-devel
|
BuildRequires: gsettings-qt-devel
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
@ -36,6 +37,7 @@ Simple bluetooth tool for ukui desktop environment
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
@ -71,5 +73,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 29 2021 tanyulong <tanyulong@kylinos.cn> - 1.0.0-2
|
||||||
|
- For a machine without Bluetooth function,Bluetooth is pulled up by the session manager and exits abnormally
|
||||||
|
|
||||||
* Fri Aug 06 2021 tanyulong <tanyulong@kylinos.cn> - 1.0.0-1
|
* Fri Aug 06 2021 tanyulong <tanyulong@kylinos.cn> - 1.0.0-1
|
||||||
- init packages
|
- init packages
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user