49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
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
|
|
|