Repair the user guide does not work

(cherry picked from commit 0344d428aecac465ee0f0bb16b821fe94288a2e6)
This commit is contained in:
peijiankang 2023-03-06 16:25:43 +08:00 committed by openeuler-sync-bot
parent 482d7ad8c0
commit 5b60b94a1f
2 changed files with 62 additions and 2 deletions

View File

@ -0,0 +1,55 @@
From b3aed237023c99049dc4a7810fabc5ee8c37fbdf Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 6 Mar 2023 16:23:06 +0800
Subject: [PATCH] Repair the user guide does not work
---
src/mainwindow.cpp | 3 ++-
src/widget/kmenu.cpp | 3 ++-
src/widget/kmenu.h | 2 +
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 8925988..c69ee0a 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -786,7 +786,8 @@ void MainWindow::slotChangeMiniState()
void MainWindow::slotOpenHelpDoc()
{
// 帮助手册 先就分开写吧,快捷键不生效不知道为啥
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
+ QString service_name = "com.kylinUserGuide.hotel_" + QString::number(getuid());
+ QDBusMessage m = QDBusMessage::createMethodCall(service_name,
"/",
"com.guide.hotel",
"showGuide");
diff --git a/src/widget/kmenu.cpp b/src/widget/kmenu.cpp
index 72176cb..1b90a76 100644
--- a/src/widget/kmenu.cpp
+++ b/src/widget/kmenu.cpp
@@ -1136,7 +1136,8 @@ void TitleMenu::createHelpMenu()
act_f1 = new KAction(QKeySequence("F1"), nullptr, "manual");
connect(act_f1, &KAction::triggered, [this](){
// 帮助手册
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
+ QString service_name = "com.kylinUserGuide.hotel_" + QString::number(getuid());
+ QDBusMessage m = QDBusMessage::createMethodCall(service_name,
"/",
"com.guide.hotel",
"showGuide");
diff --git a/src/widget/kmenu.h b/src/widget/kmenu.h
index 62abafc..42859b2 100644
--- a/src/widget/kmenu.h
+++ b/src/widget/kmenu.h
@@ -3,6 +3,8 @@
#include <QMenu>
#include "core/mpvtypes.h"
+#include <unistd.h>
+#include <sys/types.h>
#define OfficialWebsite "https://www.kylinos.cn"
#define AdvideFeedback "mailto:product@kylinos.cn"
--
2.33.0

View File

@ -1,11 +1,12 @@
Name: kylin-video
Version: 3.1.4
Release: 2
Release: 3
Summary: A powerful video player
License: GPL-2.0+
URL: https://gitee.com/openkylin/kylin-video
Source0: kylin-video-3.1.4.tar.gz
Patch1: 0001-fix-compile-error-of-kylin-video.patch
Patch01: 0001-fix-compile-error-of-kylin-video.patch
Patch02: 0002-Repair-the-user-guide-does-not-work.patch
BuildRequires: ffmpeg-devel
BuildRequires: libcrystalhd-devel
@ -39,6 +40,7 @@ It supports both x86 and ARM platform, and supports most of the audio and video
%prep
%setup -q
%patch01 -p1
%patch02 -p1
%build
mkdir qmake-build
@ -61,6 +63,9 @@ popd
%changelog
* Mon Mar 06 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.4-3
- Repair the user guide does not work
* Tue Feb 07 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.4-2
- add build debuginfo and debugsource