- 简要展示激活信息,提供激活信息入口 - 修复部分代码问题 - 调整控制中心弹窗按钮问题 - 修复快捷键 提取desktop entry Exec过滤%u,%f问题 - 修复检查出内存泄漏的问题
101 lines
3.7 KiB
Diff
101 lines
3.7 KiB
Diff
From 896bb4517b2a8a413265ffb6795ce2b5acb885d4 Mon Sep 17 00:00:00 2001
|
|
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
|
Date: Wed, 9 Nov 2022 15:02:41 +0800
|
|
Subject: [PATCH 2/5] fix(memcheck): Fix problems in valgrind memcheck
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
- 修复valgrind memcheck中出现的问题
|
|
---
|
|
lib/common-widgets/kiran-frame/kiran-frame.h | 1 +
|
|
plugins/appearance/src/pages/theme/theme-widget.h | 14 +++++++-------
|
|
.../appearance/src/pages/wallpaper/wallpaper.cpp | 1 +
|
|
plugins/system/src/kylinsec-logo.cpp | 1 +
|
|
.../system-information/system-information.cpp | 5 +++--
|
|
5 files changed, 13 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/lib/common-widgets/kiran-frame/kiran-frame.h b/lib/common-widgets/kiran-frame/kiran-frame.h
|
|
index 1b1f290..4a3dc9f 100644
|
|
--- a/lib/common-widgets/kiran-frame/kiran-frame.h
|
|
+++ b/lib/common-widgets/kiran-frame/kiran-frame.h
|
|
@@ -22,6 +22,7 @@
|
|
//给控制中心组件提供色块的控件,用于突出显示
|
|
class KiranFrame : public QWidget
|
|
{
|
|
+ Q_OBJECT
|
|
public:
|
|
explicit KiranFrame(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
|
|
|
diff --git a/plugins/appearance/src/pages/theme/theme-widget.h b/plugins/appearance/src/pages/theme/theme-widget.h
|
|
index df419ad..672876f 100644
|
|
--- a/plugins/appearance/src/pages/theme/theme-widget.h
|
|
+++ b/plugins/appearance/src/pages/theme/theme-widget.h
|
|
@@ -44,15 +44,15 @@ protected:
|
|
virtual bool eventFilter(QObject* watched, QEvent* event);
|
|
|
|
private:
|
|
- QLabel* m_iconSelectLabel;
|
|
- KiranFrame* m_iconImgWidget;
|
|
- QWidget* m_currIconTheme;
|
|
+ QLabel* m_iconSelectLabel = nullptr;
|
|
+ KiranFrame* m_iconImgWidget = nullptr;
|
|
+ QWidget* m_currIconTheme = nullptr;
|
|
|
|
- QLabel* m_selectLabel;
|
|
- KiranFrame* m_themeImgWidget;
|
|
+ QLabel* m_selectLabel = nullptr;
|
|
+ KiranFrame* m_themeImgWidget = nullptr;
|
|
|
|
- QLabel* m_cursorSelectLabel;
|
|
- KiranFrame* m_cursorWidget;
|
|
+ QLabel* m_cursorSelectLabel = nullptr;
|
|
+ KiranFrame* m_cursorWidget = nullptr;
|
|
|
|
QString m_theme;
|
|
};
|
|
diff --git a/plugins/appearance/src/pages/wallpaper/wallpaper.cpp b/plugins/appearance/src/pages/wallpaper/wallpaper.cpp
|
|
index 139ab0f..9abd0b8 100644
|
|
--- a/plugins/appearance/src/pages/wallpaper/wallpaper.cpp
|
|
+++ b/plugins/appearance/src/pages/wallpaper/wallpaper.cpp
|
|
@@ -69,6 +69,7 @@ Wallpaper::~Wallpaper()
|
|
delete ui;
|
|
m_thread->quit();
|
|
m_thread->wait();
|
|
+ delete m_thread;
|
|
}
|
|
|
|
void Wallpaper::initUI()
|
|
diff --git a/plugins/system/src/kylinsec-logo.cpp b/plugins/system/src/kylinsec-logo.cpp
|
|
index 31df8c4..5c1e24b 100644
|
|
--- a/plugins/system/src/kylinsec-logo.cpp
|
|
+++ b/plugins/system/src/kylinsec-logo.cpp
|
|
@@ -19,6 +19,7 @@
|
|
#define SYSTEM_LOGO "KylinSec OS"
|
|
|
|
KylinsecLogo::KylinsecLogo(QWidget *parent)
|
|
+ :QWidget(parent)
|
|
{
|
|
setAccessibleName("KylinsecLogo");
|
|
}
|
|
diff --git a/plugins/system/src/pages/system-information/system-information.cpp b/plugins/system/src/pages/system-information/system-information.cpp
|
|
index bf36086..0fb839f 100644
|
|
--- a/plugins/system/src/pages/system-information/system-information.cpp
|
|
+++ b/plugins/system/src/pages/system-information/system-information.cpp
|
|
@@ -134,9 +134,10 @@ bool SystemInformation::initUI()
|
|
label->setStyleSheet("color:#919191;font-family: \"Noto Sans CJK SC regular\";");
|
|
}
|
|
|
|
- auto kiranFrames = findChildren<KiranFrame*>();
|
|
- for (auto frame : kiranFrames)
|
|
+ QList<KiranFrame*> kiranFrames = findChildren<KiranFrame*>();
|
|
+ for (int i = 0; i < kiranFrames.count();i++)
|
|
{
|
|
+ KiranFrame* frame = kiranFrames.at(i);
|
|
frame->setRadius(6);
|
|
frame->setDrawBroder(false);
|
|
}
|
|
--
|
|
2.33.0
|
|
|