!22 [sync] PR-19: modify version is error
From: @openeuler-sync-bot Reviewed-by: @peijiankang Signed-off-by: @peijiankang
This commit is contained in:
commit
cfe6e7ecf1
48
0003-modify-version-is-error.patch
Normal file
48
0003-modify-version-is-error.patch
Normal file
@ -0,0 +1,48 @@
|
||||
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
|
||||
|
||||
@ -2,13 +2,14 @@
|
||||
|
||||
Name: kylin-video
|
||||
Version: 3.1.3
|
||||
Release: 4
|
||||
Release: 5
|
||||
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
|
||||
|
||||
BuildRequires: qt5-devel
|
||||
BuildRequires: qtchooser
|
||||
@ -41,6 +42,7 @@ It supports both x86 and ARM platform, and supports most of the audio and video
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -66,6 +68,9 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
- add tinyxml2 requires
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user