!39 modify-version-info-error
From: @peijiankang Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
e1d20a8aea
45
0001-modify-version-info-error.patch
Normal file
45
0001-modify-version-info-error.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From e6034240c90de760062bce5eddd1500748ca1542 Mon Sep 17 00:00:00 2001
|
||||||
|
From: pei-jiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Mon, 14 Mar 2022 10:46:34 +0800
|
||||||
|
Subject: [PATCH] modify version-info error
|
||||||
|
|
||||||
|
---
|
||||||
|
src/menumodule.cpp | 22 +++++++++++++++++++++-
|
||||||
|
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/menumodule.cpp b/src/menumodule.cpp
|
||||||
|
index 040a8e5..6cd0b48 100644
|
||||||
|
--- a/src/menumodule.cpp
|
||||||
|
+++ b/src/menumodule.cpp
|
||||||
|
@@ -247,7 +247,27 @@ QHBoxLayout* menuModule::initTitleBar(){
|
||||||
|
|
||||||
|
QVBoxLayout* menuModule::initBody(){
|
||||||
|
appVersion = "3.1.1";
|
||||||
|
-
|
||||||
|
+ FILE *pp = NULL;
|
||||||
|
+ char *line = NULL;
|
||||||
|
+ char *q = NULL;
|
||||||
|
+ size_t len = 0;
|
||||||
|
+ ssize_t read;
|
||||||
|
+
|
||||||
|
+ pp = popen("rpm -qa indicator-china-weather", "r");
|
||||||
|
+ if(pp) { while((read = 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(3);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if(line){
|
||||||
|
+ free(line);
|
||||||
|
+ line = NULL;
|
||||||
|
+ }
|
||||||
|
+ pclose(pp);
|
||||||
|
|
||||||
|
QPushButton *bodyIcon = new QPushButton();
|
||||||
|
bodyIcon->setFixedSize(96,96);
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
Name: indicator-china-weather
|
Name: indicator-china-weather
|
||||||
Version: 3.1.3
|
Version: 3.1.3
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: The weather data are from the heweather API s6 version.
|
Summary: The weather data are from the heweather API s6 version.
|
||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
URL: https://github.com/UbuntuKylin/indicator-china-weather
|
URL: https://github.com/UbuntuKylin/indicator-china-weather
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-correction-the-desktop-file.patch
|
Patch01: 0001-correction-the-desktop-file.patch
|
||||||
|
Patch02: 0001-modify-version-info-error.patch
|
||||||
|
|
||||||
BuildRequires: qtchooser
|
BuildRequires: qtchooser
|
||||||
BuildRequires: qt5-qtx11extras-devel
|
BuildRequires: qt5-qtx11extras-devel
|
||||||
@ -29,8 +30,7 @@ BuildRequires: GeoIP-devel
|
|||||||
change it.
|
change it.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default indicator-china-weather.pro
|
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default indicator-china-weather.pro
|
||||||
@ -62,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/man/man1/indicator-china-weather.1.gz
|
%{_datadir}/man/man1/indicator-china-weather.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 14 2023 douyan <douyan@kylinos.cn> - 3.1.3-4
|
||||||
|
- sync with master, add 0001-correction-the-desktop-file.patch
|
||||||
|
|
||||||
* Tue Feb 07 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.3-3
|
* Tue Feb 07 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.3-3
|
||||||
- correction the desktop file
|
- correction the desktop file
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user