Compare commits

..

No commits in common. "6bbd73c4a28e39ff0e09b4e0121b6767093c40ed" and "19e1777dc1660702b95c42d047bb005e0425b857" have entirely different histories.

5 changed files with 25 additions and 141 deletions

View File

@ -1,29 +0,0 @@
From 033cecc576749ca7a542efccdcdefb29c1f3ef69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Mon, 15 Apr 2024 11:12:34 +0800
Subject: [PATCH] ukui-panel: fix a memory leak problem
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
panel/ukuipanel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panel/ukuipanel.cpp b/panel/ukuipanel.cpp
index 93efa54..e3fa7a5 100644
--- a/panel/ukuipanel.cpp
+++ b/panel/ukuipanel.cpp
@@ -294,7 +294,7 @@ UKUIPanel::UKUIPanel(const QString &configGroup, UKUi::Settings *settings, QWidg
styleAdjust();
qDebug()<<"Panel :: UKuiPanel finished";
- UKuiPanelInformation* dbus=new UKuiPanelInformation;
+ UKuiPanelInformation* dbus=new UKuiPanelInformation(this);
new PanelAdaptor(dbus);
QDBusConnection con=QDBusConnection::sessionBus();
if(!con.registerService("org.ukui.panel") ||
--
2.43.0

View File

@ -1,32 +0,0 @@
From 4f7b0a8c64580ce6272fc27d9bc8f89e1c8a25df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Mon, 15 Apr 2024 10:11:43 +0800
Subject: [PATCH] ukui-panel: fix incorrect usage of deallocation func
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
panel/ukuipanelapplication.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/panel/ukuipanelapplication.cpp b/panel/ukuipanelapplication.cpp
index d69244b..29cfc4b 100644
--- a/panel/ukuipanelapplication.cpp
+++ b/panel/ukuipanelapplication.cpp
@@ -289,8 +289,9 @@ bool UKUIPanelApplication::copyFileToPath(QString sourceDir ,QString toDir, QStr
createFile->remove(toDir+fileName);
}
}//end if
- free(createDir);
- free(createFile);
+
+ delete createDir;
+ delete createFile;
if(!QFile::copy(sourceDir+fileName, toDir+fileName))
{
--
2.43.0

View File

@ -1,27 +1,33 @@
From 364e77f821d31c1cff7dc9bf83d1cbe47b60e7e9 Mon Sep 17 00:00:00 2001
From 1727c034ae8f43ba607d75503e0d9840bdf497cd Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Thu, 29 Jun 2023 17:45:28 +0800
Date: Tue, 17 Jan 2023 10:12:33 +0800
Subject: [PATCH] fix translation of calendar
---
plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp | 4 ++++
1 file changed, 4 insertions(+)
plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
index 4c5e743..1c4d931 100644
index 4c5e743..40686e8 100644
--- a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
+++ b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
@@ -668,9 +668,13 @@ QStringList LunarCalendarWidget::getLocale()
propertyMap = reply.value();
if (propertyMap.keys().contains("FormatsLocale")) {
formats = propertyMap.find("FormatsLocale").value().toString();
+ if(formats.isEmpty())
+ formats = QLocale::system().name() + ".UTF-8";
@@ -606,8 +606,8 @@ void LunarCalendarWidget::setLocaleCalendar()
{
QStringList res = getLocale();
- qDebug()<<"设置区域:"<<res.at(0);
- int isCN = res.at(0) == "zh_CN.UTF-8" ? 1 : 0;
+ qDebug()<<"设置区域:"<<res.at(1);
+ int isCN = res.at(1).contains("zh_CN", Qt::CaseSensitive);
if(isCN){
if (FirstdayisSun) {
labWeeks.at(0)->setText("周日");
@@ -671,6 +671,8 @@ QStringList LunarCalendarWidget::getLocale()
}
if(language.isEmpty() && propertyMap.keys().contains("Language")) {
language = propertyMap.find("Language").value().toString();
+ if(language.isEmpty())
+ language = QLocale::system().name() + ".UTF-8";
+ if(language.isEmpty())
+ language = QLocale::system().name();
}
} else {
qDebug() << "reply failed";

View File

@ -1,25 +0,0 @@
From bc49dae5bb33b111c9fb877c255bfb1ebc29514a Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Thu, 27 Jul 2023 17:12:31 +0800
Subject: [PATCH] Modify file permissions
---
panel/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panel/CMakeLists.txt b/panel/CMakeLists.txt
index bdfcf63..815b553 100644
--- a/panel/CMakeLists.txt
+++ b/panel/CMakeLists.txt
@@ -184,7 +184,7 @@ install(FILES
resources/panel-commission.sh resources/ukui-panel-reset.sh resources/ukui-panel-config.sh
DESTINATION "/usr/share/ukui/ukui-panel"
COMPONENT Runtime
- PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE WORLD_EXECUTE
+ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE
GROUP_EXECUTE GROUP_READ
)
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: ukui-panel
Version: 3.1.0
Release: 14
Release: 9
Summary: ukui desktop panel
License: LGPL-2.0-or-later and GPL-2.0-or-later and BSD
URL: http://www.ukui.org
@ -12,9 +12,6 @@ Patch04: 0004-fix-the-backlight-of-nightmode-button.patch
%if 0%{?kylin}
Patch05: disable-Suspend-and-Sleep-of-ukui-panel.patch
%endif
Patch06: Modify-file-permissions.patch
Patch07: 0001-ukui-panel-fix-incorrect-usage-of-deallocation-func.patch
Patch08: 0001-ukui-panel-fix-a-memory-leak-problem.patch
BuildRequires: cmake
BuildRequires: alsa-lib-devel
@ -62,16 +59,13 @@ Recommends: time-shutdown
%prep
%setup -q
%patch 01 -p1
%patch 02 -p1
%patch 03 -p1
%patch 04 -p1
%patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -p1
%if 0%{?kylin}
%patch 05 -p1
%patch05 -p1
%endif
%patch 06 -p1
%patch 07 -p1
%patch 08 -p1
%build
mkdir build && cd build
@ -94,36 +88,6 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/*
%changelog
* Mon May 06 2024 douyan <douyan@kylinos.cn> - 3.1.0-14
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix %patchN is deprecated warning
* Tue Apr 16 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.0-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add 0001-ukui-panel-fix-a-memory-leak-problem.patch
* Mon Apr 15 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.0-12
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add 0001-ukui-panel-fix-incorrect-usage-of-deallocation-func.patch
* Thu Sep 07 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-11
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: update 0002-fix-translation-of-calendar.patch
* Thu Jul 27 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-10
- Type:update
- ID:NA
- SUG:NA
- DESC: add Modify-file-permissions.patch
* Wed Jun 14 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-9
- Type:bugfix
- ID:NA