From a71eb7b48d116e07590c647d8188a7012d71a788 Mon Sep 17 00:00:00 2001 From: tanyulong2021 Date: Wed, 3 Aug 2022 15:19:24 +0800 Subject: [PATCH] fix startup segfault issue --- 0001-fix-startup-segfault-issue.patch | 42 +++++++++++++++++++++++++++ ukui-bluetooth.spec | 9 ++++-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 0001-fix-startup-segfault-issue.patch diff --git a/0001-fix-startup-segfault-issue.patch b/0001-fix-startup-segfault-issue.patch new file mode 100644 index 0000000..e4cf8c2 --- /dev/null +++ b/0001-fix-startup-segfault-issue.patch @@ -0,0 +1,42 @@ +From 9904da94d3e0c259f489d56abf37834052090b99 Mon Sep 17 00:00:00 2001 +From: tanyulong2021 +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 + diff --git a/ukui-bluetooth.spec b/ukui-bluetooth.spec index 82d42ba..160169d 100644 --- a/ukui-bluetooth.spec +++ b/ukui-bluetooth.spec @@ -2,7 +2,7 @@ Name: ukui-bluetooth Version: 1.0.2 -Release: 2 +Release: 3 Summary: Advanced ukui bluetooth License: GPLv2+ URL: http://www.ukui.org @@ -26,14 +26,14 @@ Requires: bluez >= 5.0 Requires: bluez-obexd Requires: peony-extensions - - +Patch0: 0001-fix-startup-segfault-issue.patch %description A lightweight Bluetooth tool based on libkf5bluezqt6 on the UKUI desktop environment %prep %setup -q +%patch0 -p1 %build mkdir build && cd build @@ -70,6 +70,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Aug 03 2022 tanyulong - 1.0.2-3 +- fix startup segfault issue + * Tue Jun 21 2022 peijiankang - 1.0.2-2 - Remove kf5-bluez-qt-common