!36 Synchronize master branch, update to 3.1.4

From: @hua_yadong 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
This commit is contained in:
openeuler-ci-bot 2023-05-25 00:27:46 +00:00 committed by Gitee
commit 6b8f0269ee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 106 additions and 278 deletions

View File

@ -1,49 +1,23 @@
From cbd3af35feb59f1bb4a084bbb7ec70bf011d3020 Mon Sep 17 00:00:00 2001
From ac49dca45e090301659418b050550b52663a0832 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Tue, 7 Jun 2022 15:59:00 +0800
Subject: [PATCH] modify compile error of kylin-video
Date: Thu, 1 Dec 2022 10:12:04 +0800
Subject: [PATCH] fix compile error of kylin-video
---
src/eventpasswidget.cpp | 1 +
src/playlist.h | 1 +
.../resource/ico/menubar/shuoming.png | Bin
src/resource/res.qrc | 2 +-
src/resource/resource.qrc | 2 +-
src/src.pro | 2 +-
src/translations/generate_translations_pm.sh | 2 +-
7 files changed, 6 insertions(+), 4 deletions(-)
5 files changed, 4 insertions(+), 4 deletions(-)
rename "src/resource/ico/menubar/\303\250\302\257\302\264\303\246\302\230\302\216.png" => src/resource/ico/menubar/shuoming.png (100%)
diff --git a/src/eventpasswidget.cpp b/src/eventpasswidget.cpp
index b3be9e0..75c8488 100644
--- a/src/eventpasswidget.cpp
+++ b/src/eventpasswidget.cpp
@@ -2,6 +2,7 @@
#include <QTimer>
#include <QDebug>
+#include <QMouseEvent>
#include "global/globalsignal.h"
#include "global/global.h"
diff --git a/src/playlist.h b/src/playlist.h
index b282ec6..d8eed8a 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -2,6 +2,7 @@
#define PLAYLIST_H
#include <QObject>
+#include <QSet>
#include <mutex>
diff --git "a/src/resource/ico/menubar/\303\250\302\257\302\264\303\246\302\230\302\216.png" b/src/resource/ico/menubar/shuoming.png
similarity index 100%
rename from "src/resource/ico/menubar/\303\250\302\257\302\264\303\246\302\230\302\216.png"
rename to src/resource/ico/menubar/shuoming.png
diff --git a/src/resource/res.qrc b/src/resource/res.qrc
index 667aded..012f03e 100644
index fe53d93..7c039de 100644
--- a/src/resource/res.qrc
+++ b/src/resource/res.qrc
@@ -24,7 +24,7 @@
@ -69,15 +43,15 @@ index b68f280..a876eb4 100644
<file>ico/menubar/guanbi_b_3x.png</file>
<file>ico/menubar/guanbi_c_3x.png</file>
diff --git a/src/src.pro b/src/src.pro
index 33976d0..ec58c5e 100644
index 18450f5..fe120e9 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -19,7 +19,7 @@ DEFINES += QT_DEPRECATED_WARNINGS _UNICODE
@@ -20,7 +20,7 @@ DEFINES += QT_DEPRECATED_WARNINGS _UNICODE
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-INCLUDEPATH += /usr/include/KF5/KWindowSystem/ ./log ./sliderbar
+INCLUDEPATH += /usr/include/KF5/KWindowSystem/ ./log ./sliderbar /usr/include/ffmpeg/
-INCLUDEPATH += /usr/include/KF5/KWindowSystem/ ./log ./sliderbar ./kwidget
+INCLUDEPATH += /usr/include/KF5/KWindowSystem/ /usr/include/ffmpeg ./log ./sliderbar ./kwidget
!system($$PWD/translations/generate_translations_pm.sh): error("Failed to generate pm")
qm_files.files = translations/*.qm

View File

@ -1,95 +0,0 @@
From 258b80e7f0a6e66185676f4da56bccff94175955 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
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 <QDesktopServices>
#include <QFileSystemWatcher>
#include <ukui-log4qt.h>
+#include <unistd.h>
+#include <sys/types.h>
#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 <QFileSystemWatcher>
#include <QPropertyAnimation>
#include <ukui-log4qt.h>
+#include <unistd.h>
+#include <sys/types.h>
#include <KWindowSystem>
@@ -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 <QFileSystemWatcher>
#include <KF5/KWindowSystem/kwindowsystem.h>
#include <ukui-log4qt.h>
+#include <unistd.h>
+#include <sys/types.h>
#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

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,48 +0,0 @@
From 749a7b4cb7fceba82b8a715bbabdac6fa104591a Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 22 Aug 2022 14:44:23 +0800
Subject: [PATCH] modify version is error
---
src/aboutdialog.cpp | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp
index 1df8335..e6b9f0f 100644
--- a/src/aboutdialog.cpp
+++ b/src/aboutdialog.cpp
@@ -34,8 +34,30 @@ AboutDialog::AboutDialog(QWidget *parent) :
ui->label_2->setFont(f);
connect(ui->btn_close, &QPushButton::clicked, [&](){close();});
+
+ QString appVersion;
+ FILE *pp = NULL;
+ char *line = NULL;
+ char *q = NULL;
+ size_t len = 0;
+
+ pp = popen("rpm -q kylin-video", "r");
+ if(pp) { while(getline(&line, &len, pp) != -1){
+ q = strrchr(line, '\n');
+ *q = '\0';
+ QString content = line;
+ QStringList list = content.split("-");
+ if (list.size() >= 3)
+ appVersion = list.at(2);
+ }
+ }
+ if(line){
+ free(line);
+ line = NULL;
+ }
+ pclose(pp);
- ui->label_3->setText(QString("<html><head/><body><p align=\"center\">%0</p></body></html>").arg(tr("version: ").append("3.1.1")));
+ ui->label_3->setText(QString("<html><head/><body><p align=\"center\">%0</p></body></html>").arg(tr("version: ").append(appVersion)));
ui->label_4->setText(tr("service and support: ").append("<a href=\"mailto://support@kylinos.cn\">support@kylinos.cn</a>"));
connect(ui->label_4, SIGNAL(linkActivated(QString)), this, SLOT(slotOpenUrl(QString)));
initStyle();
--
2.33.0

View File

@ -1,25 +0,0 @@
From 3671a414343f43244cd15bf2581dbc3f75327f73 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 22 Aug 2022 17:42:27 +0800
Subject: [PATCH] Fix about background not changing with style
---
src/global/global.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/global/global.h b/src/global/global.h
index 8da1296..bc31db6 100644
--- a/src/global/global.h
+++ b/src/global/global.h
@@ -42,7 +42,7 @@ class QGSettings;
class ShortCutSetting;
//using namespace Control;
#define ORG_UKUI_STYLE "org.ukui.style"
-#define STYLE_UKUI_DEFAULT "ukui"
+#define STYLE_UKUI_DEFAULT "ukui-default"
#define STYLE_UKUI_BLACK "ukui-dark"
#define ICO_DIR_DEFAULT "ico_light"
#define ICO_DIR_DBLACK "ico"
--
2.33.0

View File

@ -1,33 +0,0 @@
From 04941e0bd5c400905ecb130bdeab327c408cd491 Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Thu, 8 Sep 2022 14:23:42 +0800
Subject: [PATCH] ssssssssssssss
---
src/topwindow.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/topwindow.cpp b/src/topwindow.cpp
index f55bdc2..2b3d61a 100644
--- a/src/topwindow.cpp
+++ b/src/topwindow.cpp
@@ -1,5 +1,4 @@
#include "topwindow.h"
-
#include <QDebug>
#include <QTimer>
#include <QMimeData>
@@ -399,8 +398,8 @@ void TopWindow::moveEvent(QMoveEvent *e)
void TopWindow::mouseMoveEvent(QMouseEvent *e)
{
- if (m_isMove) {
- move(pos() + e->pos() - m_pressPos);
+ if (m_isMove){
+ move(e->globalPos() - m_pressPos);
}
}
--
2.36.1

Binary file not shown.

BIN
kylin-video-3.1.4.tar.gz Normal file

Binary file not shown.

View File

@ -1,40 +1,37 @@
%global debug_package %{nil}
Name: kylin-video
Version: 3.1.3
Release: 7
Version: 3.1.4
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
Patch3: 0003-modify-version-is-error.patch
Patch4: 0004-Fix-about-background-not-changing-with-style.patch
Patch5: 0005-fix-the-window-jump-problem-when-dragging-the-window.patch
License: GPL-2.0+
URL: https://gitee.com/openkylin/kylin-video
Source0: kylin-video-3.1.4.tar.gz
Patch01: 0001-fix-compile-error-of-kylin-video.patch
Patch02: 0002-Repair-the-user-guide-does-not-work.patch
BuildRequires: qt5-devel
BuildRequires: ffmpeg-devel
BuildRequires: libcrystalhd-devel
BuildRequires: ffmpegthumbnailer-devel
BuildRequires: gsettings-qt-devel
BuildRequires: kf5-kwayland-devel
BuildRequires: kf5-kwindowsystem-devel
BuildRequires: libmediainfo-devel
BuildRequires: mpv-libs-devel
BuildRequires: qt5-qtx11extras-devel
BuildRequires: ukui-interface
BuildRequires: wayland-devel
BuildRequires: libX11-devel
BuildRequires: libzen-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtbase-private-devel
BuildRequires: qtchooser
BuildRequires: qt5-qtscript-devel
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-qtbase-private-devel
BuildRequires: qt5-qtx11extras-devel
BuildRequires: libX11-devel
BuildRequires: libcrystalhd-devel
BuildRequires: zlib-devel
BuildRequires: ffmpeg-devel
BuildRequires: gsettings-qt-devel
BuildRequires: mpv-libs-devel
BuildRequires: kf5-kwindowsystem-devel
BuildRequires: kf5-kwayland-devel
BuildRequires: wayland-devel
BuildRequires: libzen-devel
BuildRequires: libmediainfo-devel
BuildRequires: ffmpegthumbnailer-devel
BuildRequires: ukui-interface
Requires: mesa-vdpau-drivers libcrystalhd-devel mpv ffmpegthumbnailer-devel tinyxml2
BuildRequires: libkysdk-qtwidgets-devel
BuildRequires: libkysdk-waylandhelper-devel
BuildRequires: qtav-devel
Requires: mesa-vdpau-drivers libcrystalhd-devel mpv ffmpegthumbnailer-devel libqtavwidgets
%description
Front-end for MPlayer and MPV Qt5 Mplayer and MPV front-end, with basic features like playing videos and audios to more advanced features.
@ -42,19 +39,14 @@ It supports both x86 and ARM platform, and supports most of the audio and video
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch01 -p1
%patch02 -p1
%build
export PATH=%{_qt5_bindir}:$PATH
mkdir qmake-build
pushd qmake-build
%{qmake_qt5} ..
%{make_build}
%{make_build} -j4
popd
%install
@ -63,15 +55,23 @@ pushd qmake-build
popd
%files
%license COPYING debian/copyright
%doc README.md
%{_bindir}/kylin-video-new
%license debian/copyright
%{_bindir}/kylin-video
%{_datadir}/applications/kylin-video.desktop
%{_datadir}/kylin-user-guide/data/guide/kylin-video/*
%{_datadir}/kylin-video/translations/kylin-video_zh_CN.qm
%{_datadir}/kylin-video/translations/*
%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
* Thu Dec 1 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.4-1
update verison to 3.1.4(2022.12.01)
* Thu Sep 8 2022 huayadong <huayadong@kylinos.cn> - 3.1.3-7
Fix the window jump problem when dragging the window
@ -81,7 +81,7 @@ popd
* Mon Aug 22 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-5
- modify version is error
* Wed Aug 19 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-4
* Fri Aug 19 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-4
- add tinyxml2 requires
* Thu Jun 9 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-3