43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 9904da94d3e0c259f489d56abf37834052090b99 Mon Sep 17 00:00:00 2001
|
|
From: tanyulong2021 <tanyulong@kylinos.cn>
|
|
Date: Wed, 3 Aug 2022 19:16:00 +0800
|
|
Subject: [PATCH] fix startup segfault issue
|
|
|
|
---
|
|
ukui-bluetooth/main/featureswidget.cpp | 12 +++++++-----
|
|
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/ukui-bluetooth/main/featureswidget.cpp b/ukui-bluetooth/main/featureswidget.cpp
|
|
index e753930..314de45 100644
|
|
--- a/ukui-bluetooth/main/featureswidget.cpp
|
|
+++ b/ukui-bluetooth/main/featureswidget.cpp
|
|
@@ -33,7 +33,7 @@ enum {
|
|
|
|
static guint watch = 0;
|
|
bool spe_bt_node = false;
|
|
-bool not_hci_node = true;
|
|
+bool not_hci_node = false;
|
|
bool M_adapter_flag = false;
|
|
bool M_power_on = false;
|
|
|
|
@@ -605,10 +605,12 @@ void FeaturesWidget::InitTrayMenu()
|
|
QAction *settins_action = new QAction(tr("Bluetooth settings"),tray_Menu);
|
|
settins_action->setCheckable(true);
|
|
tray_Menu->addAction(settins_action);
|
|
- //tray_Menu->move(bluetooth_tray_icon->geometry().x()+16,bluetooth_tray_icon->geometry().y()-50);
|
|
- //tray_Menu->exec();
|
|
- setWidgetPosition();
|
|
-
|
|
+ if(!QFile("/usr/bin/ukui-panel").exists()){
|
|
+ tray_Menu->move(bluetooth_tray_icon->geometry().x()+16,bluetooth_tray_icon->geometry().y()-50);
|
|
+ tray_Menu->exec();
|
|
+ }else{
|
|
+ setWidgetPosition();
|
|
+ }
|
|
}
|
|
|
|
void FeaturesWidget::setWidgetPosition()
|
|
--
|
|
2.33.0
|
|
|