From f1d59705587b783a5e41afbade975d52767c2c33 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Thu, 9 Jun 2022 09:30:32 +0800 Subject: [PATCH] Fix the problem of the help manual button --- ...he-problem-of-the-help-manual-button.patch | 95 +++++++++++++++++++ kylin-video.spec | 7 +- 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 0002-Fix-the-problem-of-the-help-manual-button.patch diff --git a/0002-Fix-the-problem-of-the-help-manual-button.patch b/0002-Fix-the-problem-of-the-help-manual-button.patch new file mode 100644 index 0000000..6f8f39b --- /dev/null +++ b/0002-Fix-the-problem-of-the-help-manual-button.patch @@ -0,0 +1,95 @@ +From 258b80e7f0a6e66185676f4da56bccff94175955 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Thu, 9 Jun 2022 09:27:39 +0800 +Subject: [PATCH] Fix the problem of the help manual button + +--- + src/kmenu.cpp | 8 +++++++- + src/mainwidget.cpp | 8 +++++++- + src/topwindow.cpp | 8 +++++++- + 3 files changed, 21 insertions(+), 3 deletions(-) + +diff --git a/src/kmenu.cpp b/src/kmenu.cpp +index 5240094..dd62c6a 100644 +--- a/src/kmenu.cpp ++++ b/src/kmenu.cpp +@@ -11,6 +11,8 @@ + #include + #include + #include ++#include ++#include + + #include "global/global.h" + #include "kaction.h" +@@ -1107,8 +1109,12 @@ void TitleMenu::createHelpMenu() + + act_f1 = new KAction(QKeySequence("F1"), nullptr, "manual"); + connect(act_f1, &KAction::triggered, [this](){ ++ char service_name[30]; ++ memset(service_name, 0, 30); ++ snprintf(service_name, 30, "com.kylinUserGuide.hotel_%d", getuid()); ++ + // 帮助手册 +- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000", ++ QDBusMessage m = QDBusMessage::createMethodCall(QString(service_name), + "/", + "com.guide.hotel", + "showGuide"); +diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp +index 89856fc..c7ba972 100644 +--- a/src/mainwidget.cpp ++++ b/src/mainwidget.cpp +@@ -25,6 +25,8 @@ + #include + #include + #include ++#include ++#include + + #include + +@@ -1449,8 +1451,12 @@ void MainWidget::keyPressEvent(QKeyEvent *event) + g_user_signal->fullScreen(); + } + else if(event->key() == Qt::Key_F1) { ++ char service_name[30]; ++ memset(service_name, 0, 30); ++ snprintf(service_name, 30, "com.kylinUserGuide.hotel_%d", getuid()); ++ + // 帮助手册 先就分开写吧,快捷键不生效不知道为啥 +- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000", ++ QDBusMessage m = QDBusMessage::createMethodCall(QString(service_name), + "/", + "com.guide.hotel", + "showGuide"); +diff --git a/src/topwindow.cpp b/src/topwindow.cpp +index 6b11f89..f55bdc2 100644 +--- a/src/topwindow.cpp ++++ b/src/topwindow.cpp +@@ -14,6 +14,8 @@ + #include + #include + #include ++#include ++#include + + #include "global/xatom-helper.h" + +@@ -229,8 +231,12 @@ void TopWindow::setHide() + + void TopWindow::openHelpDoc() + { ++ char service_name[30]; ++ memset(service_name, 0, 30); ++ snprintf(service_name, 30, "com.kylinUserGuide.hotel_%d", getuid()); ++ + // 帮助手册 先就分开写吧,快捷键不生效不知道为啥 +- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000", ++ QDBusMessage m = QDBusMessage::createMethodCall(QString(service_name), + "/", + "com.guide.hotel", + "showGuide"); +-- +2.33.0 + diff --git a/kylin-video.spec b/kylin-video.spec index 3b585e6..120e432 100644 --- a/kylin-video.spec +++ b/kylin-video.spec @@ -2,12 +2,13 @@ Name: kylin-video Version: 3.1.3 -Release: 2 +Release: 3 Summary: A powerful video player License: GPL-2.0-or-later and LGPL-2.0-or-later and BSD URL: https://github.com/UbuntuKylin/kylin-video Source0: kylin-video-3.1.3.tar.gz Patch1: 0001-modify-compile-error-of-kylin-video.patch +Patch2: 0002-Fix-the-problem-of-the-help-manual-button.patch BuildRequires: qt5-devel BuildRequires: qtchooser @@ -39,6 +40,7 @@ It supports both x86 and ARM platform, and supports most of the audio and video %prep %setup -q %patch1 -p1 +%patch2 -p1 %build @@ -64,6 +66,9 @@ popd %changelog +* Thu Jun 9 2022 peijiankang - 3.1.3-3 +- Fix the problem of the help manual button + * Wed Jun 8 2022 peijiankang - 3.1.3-2 - add copyright file