Compare commits
10 Commits
1c67632eed
...
0e4b1ca4c4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e4b1ca4c4 | ||
|
|
2263d93a69 | ||
|
|
608b63bf1f | ||
|
|
0ee8645ef6 | ||
|
|
04bed0d720 | ||
|
|
2bc5abd144 | ||
|
|
768e17817d | ||
|
|
d5c5ee0d20 | ||
|
|
f7958898b5 | ||
|
|
f4cfd9a8b3 |
90
0001-fix-get-Weather-error.patch
Normal file
90
0001-fix-get-Weather-error.patch
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
From 9b05757e476316786e21a902982ed3befb9de443 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Tue, 17 Jan 2023 13:42:01 +0800
|
||||||
|
Subject: [PATCH] fix get Weather error
|
||||||
|
|
||||||
|
---
|
||||||
|
src/gsettingmanager.cpp | 17 ++++++++++++++---
|
||||||
|
src/gsettingmanager.h | 3 +++
|
||||||
|
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gsettingmanager.cpp b/src/gsettingmanager.cpp
|
||||||
|
index fad7961..ff8630d 100644
|
||||||
|
--- a/src/gsettingmanager.cpp
|
||||||
|
+++ b/src/gsettingmanager.cpp
|
||||||
|
@@ -677,7 +677,7 @@ Q_GLOBAL_STATIC(WeatherGsetting, weatherGsetting)
|
||||||
|
WeatherGsetting::WeatherGsetting()
|
||||||
|
{
|
||||||
|
//获取系统
|
||||||
|
- if (PLATFORM::Intel.compare(PLATFORM::g_platformType,Qt::CaseInsensitive) == 0) {
|
||||||
|
+ if (isFileExist(WEATHER_DESKTOP_FILE)) {
|
||||||
|
const QByteArray id(WEATHER_GSETTING_OLD);
|
||||||
|
if (QGSettings::isSchemaInstalled(id)) {
|
||||||
|
m_pWeatherSetting = new QGSettings(id);
|
||||||
|
@@ -712,7 +712,7 @@ WeatherGsetting *WeatherGsetting::getInstance()
|
||||||
|
QString WeatherGsetting::getWeather()
|
||||||
|
{
|
||||||
|
//获取系统
|
||||||
|
- if (PLATFORM::Intel.compare(PLATFORM::g_platformType,Qt::CaseInsensitive) == 0) {
|
||||||
|
+ if (isFileExist(WEATHER_DESKTOP_FILE)) {
|
||||||
|
const QByteArray id(WEATHER_GSETTING_OLD);
|
||||||
|
if (QGSettings::isSchemaInstalled(id) && m_pWeatherSetting != nullptr \
|
||||||
|
&& m_pWeatherSetting->keys().contains(WEATHER_GSETTING_KEY)) {
|
||||||
|
@@ -740,7 +740,7 @@ QString WeatherGsetting::getWeather()
|
||||||
|
QString WeatherGsetting::getIcon()
|
||||||
|
{
|
||||||
|
//获取系统
|
||||||
|
- if (PLATFORM::Intel.compare(PLATFORM::g_platformType,Qt::CaseInsensitive) == 0) {
|
||||||
|
+ if (isFileExist(WEATHER_DESKTOP_FILE)) {
|
||||||
|
const QByteArray id(WEATHER_GSETTING_OLD);
|
||||||
|
if (QGSettings::isSchemaInstalled(id) && m_pWeatherSetting != nullptr \
|
||||||
|
&& m_pWeatherSetting->keys().contains(WEATHER_GSETTING_KEY)) {
|
||||||
|
@@ -765,6 +765,17 @@ QString WeatherGsetting::getIcon()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool WeatherGsetting::isFileExist(QString FullFileName)
|
||||||
|
+{
|
||||||
|
+ QFileInfo fileInfo(FullFileName);
|
||||||
|
+ if(fileInfo.isFile())
|
||||||
|
+ {
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
//! 护眼中心
|
||||||
|
Q_GLOBAL_STATIC(EyeprotectionGsetting, eyeprotectionGsetting)
|
||||||
|
|
||||||
|
diff --git a/src/gsettingmanager.h b/src/gsettingmanager.h
|
||||||
|
index 7319a27..9440598 100644
|
||||||
|
--- a/src/gsettingmanager.h
|
||||||
|
+++ b/src/gsettingmanager.h
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
#include <QGSettings>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
+#include <QFileInfo>
|
||||||
|
#include "../platforminfo.h"
|
||||||
|
|
||||||
|
//! 控制中心-个性化部分
|
||||||
|
@@ -293,6 +294,7 @@ private:
|
||||||
|
#define WEATHER_GSETTING_OLD "org.china-weather-data.settings"
|
||||||
|
#define WEATHER_GSETTING_NEW "org.kylin-weather.settings"
|
||||||
|
#define WEATHER_GSETTING_KEY "weather"
|
||||||
|
+#define WEATHER_DESKTOP_FILE "/etc/xdg/autostart/indicator-china-weather.desktop"
|
||||||
|
|
||||||
|
class WeatherGsetting : public QObject
|
||||||
|
{
|
||||||
|
@@ -305,6 +307,7 @@ public:
|
||||||
|
|
||||||
|
QString getWeather();
|
||||||
|
QString getIcon();
|
||||||
|
+ bool isFileExist(QString FullFileName);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QGSettings *m_pWeatherSetting = nullptr;
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
33
0002-fix-userinfo-error-in-sidebar.patch
Normal file
33
0002-fix-userinfo-error-in-sidebar.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 77cd96038f9ba86e48e9aa43222903887517d7a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Fri, 30 Jun 2023 17:41:11 +0800
|
||||||
|
Subject: [PATCH] fix userinfo error in sidebar
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ukui-quick-operation-panel/accountinformation.cpp | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/ukui-quick-operation-panel/accountinformation.cpp b/src/plugins/ukui-quick-operation-panel/accountinformation.cpp
|
||||||
|
index 6adfa5f..778b5e7 100644
|
||||||
|
--- a/src/plugins/ukui-quick-operation-panel/accountinformation.cpp
|
||||||
|
+++ b/src/plugins/ukui-quick-operation-panel/accountinformation.cpp
|
||||||
|
@@ -71,8 +71,15 @@ QStringList AccountInformation::getUserObjectPath()
|
||||||
|
QStringList users;
|
||||||
|
QDBusReply<QList<QDBusObjectPath> > reply = m_pSystemUserIface->call("ListCachedUsers");
|
||||||
|
if (reply.isValid()) {
|
||||||
|
- for (QDBusObjectPath op : reply.value())
|
||||||
|
+ bool currentflag = false;
|
||||||
|
+ QString currentpath = "/org/freedesktop/Accounts/User" + QString::number(getuid());
|
||||||
|
+ for (QDBusObjectPath op : reply.value()){
|
||||||
|
users << op.path();
|
||||||
|
+ if(!op.path().compare(currentpath, Qt::CaseSensitive))
|
||||||
|
+ currentflag=true;
|
||||||
|
+ }
|
||||||
|
+ if(!currentflag)
|
||||||
|
+ users << currentpath;
|
||||||
|
}
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,12 +1,12 @@
|
|||||||
%define debug_package %{nil}
|
|
||||||
Name: ukui-sidebar
|
Name: ukui-sidebar
|
||||||
Version: 3.3.0
|
Version: 3.3.0
|
||||||
Release: 1
|
Release: 5
|
||||||
Summary: parallels toolbox for UKUI
|
Summary: parallels toolbox for UKUI
|
||||||
License: GPL-3+
|
License: GPL-3+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Patch01: 0001-fix-get-Weather-error.patch
|
||||||
|
Patch02: 0002-fix-userinfo-error-in-sidebar.patch
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
BuildRequires: qt5-qtsvg-devel
|
BuildRequires: qt5-qtsvg-devel
|
||||||
@ -19,7 +19,7 @@ BuildRequires: kf5-kwindowsystem-devel
|
|||||||
BuildRequires: libqtxdg-devel
|
BuildRequires: libqtxdg-devel
|
||||||
BuildRequires: ukui-interface
|
BuildRequires: ukui-interface
|
||||||
|
|
||||||
Recommends: ukui-notebook ukylin-feedback-client ukui-clock
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The ukui-sidebar is mainly used in the desktop operating system.
|
The ukui-sidebar is mainly used in the desktop operating system.
|
||||||
@ -29,16 +29,18 @@ Recommends: ukui-notebook ukylin-feedback-client ukui-clock
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch01 -p1
|
||||||
|
%patch02 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
qmake-qt5 ..
|
%{qmake_qt5} ..
|
||||||
make -j32
|
%{make_build}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
cd %{_builddir}/%{name}-%{version}/build
|
cd %{_builddir}/%{name}-%{version}/build
|
||||||
make INSTALL_ROOT=%{buildroot} install
|
%{make_install} INSTALL_ROOT=%{buildroot}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -72,13 +74,28 @@ done
|
|||||||
%{_datadir}/glib-2.0/schemas/
|
%{_datadir}/glib-2.0/schemas/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 30 2023 peijiankang <peijiankang@kylinos.cn> - 3.3.0-5
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: add 0002-fix-userinfo-error-in-sidebar.patch
|
||||||
|
|
||||||
|
* Sat Jun 17 2023 huayadong <huayadong@kylinos.cn> - 3.3.0-4
|
||||||
|
- remove Recommends: ukui-notebook ukylin-feedback-client ukui-clock
|
||||||
|
|
||||||
|
* Fri Feb 10 2023 peijiankang <peijiankang@kylinos.cn> - 3.3.0-3
|
||||||
|
- add build debuginfo and debugsource
|
||||||
|
|
||||||
|
* Thu Jan 12 2023 peijiankang <peijiankang@kylinos.cn> - 3.3.0-2
|
||||||
|
- fix get Weather error
|
||||||
|
|
||||||
* Mon Oct 31 2022 peijiankang <peijiankang@kylinos.cn> - 3.3.0-1
|
* Mon Oct 31 2022 peijiankang <peijiankang@kylinos.cn> - 3.3.0-1
|
||||||
- update version to 3.3.0
|
- update version to 3.3.0
|
||||||
|
|
||||||
* Wed Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-11
|
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-12
|
||||||
- Fix alarm clock modify the alarm time to one
|
- Fix alarm clock modify the alarm time to one
|
||||||
|
|
||||||
* Wed Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-11
|
* Mon Aug 8 2022 huayadong <huayadong@kylinos.cn> - 3.0.1-11
|
||||||
- fix alarm clock in all drop down boxes the highlig
|
- fix alarm clock in all drop down boxes the highlig
|
||||||
|
|
||||||
* Mon May 09 2022 pei-jiankang <peijiankang@kylinos.cn> - 3.0.1-10
|
* Mon May 09 2022 pei-jiankang <peijiankang@kylinos.cn> - 3.0.1-10
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user