diff --git a/0001-refactor-account-move-some-account-management-contro.patch b/0001-refactor-account-move-some-account-management-contro.patch new file mode 100644 index 0000000000000000000000000000000000000000..4413c74306f3a04d58f2dd85c46e4712b3f33e37 --- /dev/null +++ b/0001-refactor-account-move-some-account-management-contro.patch @@ -0,0 +1,212 @@ +From 029565d290011d2e4593ff5b5dd4c0c705c964ef Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Fri, 2 Sep 2022 09:43:37 +0800 +Subject: [PATCH] refactor(account): move some account management controls to + common component library +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 移动部分账户管理组件库至共用组件库 +--- + lib/common-widgets/CMakeLists.txt | 3 ++- + .../widgets => lib/common-widgets/hover-tips}/hover-tips.cpp | 0 + .../widgets => lib/common-widgets/hover-tips}/hover-tips.h | 0 + .../widgets => lib/common-widgets/kiran-tips}/kiran-tips.cpp | 0 + .../widgets => lib/common-widgets/kiran-tips}/kiran-tips.h | 0 + .../widgets => lib/common-widgets/kiran-tips}/kiran-tips.ui | 0 + .../lineedit-with-checkicon}/lineedit-with-checkicon.cpp | 2 +- + .../lineedit-with-checkicon}/lineedit-with-checkicon.h | 0 + plugins/account/CMakeLists.txt | 1 + + .../src/pages/advance-settings-page/advance-settings.cpp | 2 +- + .../account/src/pages/create-user-page/create-user-page.cpp | 2 +- + .../account/src/pages/create-user-page/create-user-page.ui | 2 +- + plugins/account/src/pages/user-info-page/user-info-page.cpp | 2 +- + plugins/account/src/pages/user-info-page/user-info-page.h | 2 +- + plugins/account/src/pages/user-info-page/user-info-page.ui | 2 +- + resources/control-panel-resources.qrc | 4 ++-- + 16 files changed, 12 insertions(+), 10 deletions(-) + rename {plugins/account/src/widgets => lib/common-widgets/hover-tips}/hover-tips.cpp (100%) + rename {plugins/account/src/widgets => lib/common-widgets/hover-tips}/hover-tips.h (100%) + rename {plugins/account/src/widgets => lib/common-widgets/kiran-tips}/kiran-tips.cpp (100%) + rename {plugins/account/src/widgets => lib/common-widgets/kiran-tips}/kiran-tips.h (100%) + rename {plugins/account/src/widgets => lib/common-widgets/kiran-tips}/kiran-tips.ui (100%) + rename {plugins/account/src/widgets => lib/common-widgets/lineedit-with-checkicon}/lineedit-with-checkicon.cpp (95%) + rename {plugins/account/src/widgets => lib/common-widgets/lineedit-with-checkicon}/lineedit-with-checkicon.h (100%) + +diff --git a/lib/common-widgets/CMakeLists.txt b/lib/common-widgets/CMakeLists.txt +index b713ea1..2b92f1f 100644 +--- a/lib/common-widgets/CMakeLists.txt ++++ b/lib/common-widgets/CMakeLists.txt +@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.2) + + set (TARGET_NAME common-widgets) + +-find_package(Qt5 COMPONENTS Core Widgets LinguistTools) ++find_package(Qt5 COMPONENTS Core Widgets LinguistTools Svg) + pkg_search_module(KLOG_QT5 REQUIRED klog-qt5) + pkg_search_module(KIRAN_WIDGETS_QT5 REQUIRED kiranwidgets-qt5) + pkg_search_module(KIRAN_STYLE_HELPER REQUIRED kiran-style-helper) +@@ -27,6 +27,7 @@ target_include_directories(${TARGET_NAME} PRIVATE + target_link_libraries(${TARGET_NAME} + Qt5::Core + Qt5::Widgets ++ Qt5::Svg + plugin-info + ${KIRAN_WIDGETS_QT5_LIBRARIES} + ${KIRAN_STYLE_HELPER_LIBRARIES}) +\ No newline at end of file +diff --git a/plugins/account/src/widgets/hover-tips.cpp b/lib/common-widgets/hover-tips/hover-tips.cpp +similarity index 100% +rename from plugins/account/src/widgets/hover-tips.cpp +rename to lib/common-widgets/hover-tips/hover-tips.cpp +diff --git a/plugins/account/src/widgets/hover-tips.h b/lib/common-widgets/hover-tips/hover-tips.h +similarity index 100% +rename from plugins/account/src/widgets/hover-tips.h +rename to lib/common-widgets/hover-tips/hover-tips.h +diff --git a/plugins/account/src/widgets/kiran-tips.cpp b/lib/common-widgets/kiran-tips/kiran-tips.cpp +similarity index 100% +rename from plugins/account/src/widgets/kiran-tips.cpp +rename to lib/common-widgets/kiran-tips/kiran-tips.cpp +diff --git a/plugins/account/src/widgets/kiran-tips.h b/lib/common-widgets/kiran-tips/kiran-tips.h +similarity index 100% +rename from plugins/account/src/widgets/kiran-tips.h +rename to lib/common-widgets/kiran-tips/kiran-tips.h +diff --git a/plugins/account/src/widgets/kiran-tips.ui b/lib/common-widgets/kiran-tips/kiran-tips.ui +similarity index 100% +rename from plugins/account/src/widgets/kiran-tips.ui +rename to lib/common-widgets/kiran-tips/kiran-tips.ui +diff --git a/plugins/account/src/widgets/lineedit-with-checkicon.cpp b/lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.cpp +similarity index 95% +rename from plugins/account/src/widgets/lineedit-with-checkicon.cpp +rename to lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.cpp +index 1482d5b..2f2fef1 100644 +--- a/plugins/account/src/widgets/lineedit-with-checkicon.cpp ++++ b/lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.cpp +@@ -38,7 +38,7 @@ LineEditWithCheckIcon::~LineEditWithCheckIcon() + + void LineEditWithCheckIcon::setVerificationStatus(bool isPassed) + { +- QString iconPath = isPassed ? ":/kcp-account/images/success-indicator.svg" : ":/kcp-account/images/error-indicator.svg"; ++ QString iconPath = isPassed ? ":/kiran-control-panel/images/success-indicator.svg" : ":/kiran-control-panel/images/error-indicator.svg"; + m_verificationStatus = isPassed ? VERIFICATION_PASSED : VERIFICATION_ERROR; + setIcon(QIcon(iconPath)); + } +diff --git a/plugins/account/src/widgets/lineedit-with-checkicon.h b/lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.h +similarity index 100% +rename from plugins/account/src/widgets/lineedit-with-checkicon.h +rename to lib/common-widgets/lineedit-with-checkicon/lineedit-with-checkicon.h +diff --git a/plugins/account/CMakeLists.txt b/plugins/account/CMakeLists.txt +index 4dd6107..dfb4e01 100644 +--- a/plugins/account/CMakeLists.txt ++++ b/plugins/account/CMakeLists.txt +@@ -77,6 +77,7 @@ target_include_directories(${TARGET_NAME} PRIVATE + ${KIRAN_STYLE_HELPER_INCLUDE_DIRS}) + + target_link_libraries(${TARGET_NAME} ++ common-widgets + Qt5::Widgets + Qt5::DBus + Qt5::Svg +diff --git a/plugins/account/src/pages/advance-settings-page/advance-settings.cpp b/plugins/account/src/pages/advance-settings-page/advance-settings.cpp +index 77f714a..9e58fc2 100644 +--- a/plugins/account/src/pages/advance-settings-page/advance-settings.cpp ++++ b/plugins/account/src/pages/advance-settings-page/advance-settings.cpp +@@ -17,7 +17,7 @@ + #include "global-defines.h" + #include "ui_advance-settings.h" + #include "uid-validator.h" +-#include "kiran-tips.h" ++#include "kiran-tips/kiran-tips.h" + + #include + #include +diff --git a/plugins/account/src/pages/create-user-page/create-user-page.cpp b/plugins/account/src/pages/create-user-page/create-user-page.cpp +index 22555d1..51197cb 100644 +--- a/plugins/account/src/pages/create-user-page/create-user-page.cpp ++++ b/plugins/account/src/pages/create-user-page/create-user-page.cpp +@@ -14,7 +14,7 @@ + + #include "create-user-page.h" + #include "accounts-global-info.h" +-#include "kiran-tips.h" ++#include "kiran-tips/kiran-tips.h" + #include "passwd-helper.h" + #include "src/pages/advance-settings-page/advance-settings.h" + #include "ui_create-user-page.h" +diff --git a/plugins/account/src/pages/create-user-page/create-user-page.ui b/plugins/account/src/pages/create-user-page/create-user-page.ui +index 7e6024f..8894d01 100644 +--- a/plugins/account/src/pages/create-user-page/create-user-page.ui ++++ b/plugins/account/src/pages/create-user-page/create-user-page.ui +@@ -488,7 +488,7 @@ + + LineEditWithCheckIcon + QWidget +-
lineedit-with-checkicon.h
++
lineedit-with-checkicon/lineedit-with-checkicon.h
+ 1 +
+ +diff --git a/plugins/account/src/pages/user-info-page/user-info-page.cpp b/plugins/account/src/pages/user-info-page/user-info-page.cpp +index b4d9b4b..5ddb940 100644 +--- a/plugins/account/src/pages/user-info-page/user-info-page.cpp ++++ b/plugins/account/src/pages/user-info-page/user-info-page.cpp +@@ -14,7 +14,7 @@ + + #include "user-info-page.h" + #include "accounts-global-info.h" +-#include "hover-tips.h" ++#include "hover-tips/hover-tips.h" + #include "ksd_accounts_user_proxy.h" + #include "passwd-helper.h" + #include "ui_user-info-page.h" +diff --git a/plugins/account/src/pages/user-info-page/user-info-page.h b/plugins/account/src/pages/user-info-page/user-info-page.h +index 5cba81e..99d59ba 100644 +--- a/plugins/account/src/pages/user-info-page/user-info-page.h ++++ b/plugins/account/src/pages/user-info-page/user-info-page.h +@@ -15,7 +15,7 @@ + #ifndef USERINFOPAGE_H + #define USERINFOPAGE_H + +-#include "kiran-tips.h" ++#include "kiran-tips/kiran-tips.h" + + #include + +diff --git a/plugins/account/src/pages/user-info-page/user-info-page.ui b/plugins/account/src/pages/user-info-page/user-info-page.ui +index b0c9cbe..a452b75 100644 +--- a/plugins/account/src/pages/user-info-page/user-info-page.ui ++++ b/plugins/account/src/pages/user-info-page/user-info-page.ui +@@ -868,7 +868,7 @@ + + LineEditWithCheckIcon + QWidget +-
lineedit-with-checkicon.h
++
lineedit-with-checkicon/lineedit-with-checkicon.h
+ 1 +
+ +diff --git a/resources/control-panel-resources.qrc b/resources/control-panel-resources.qrc +index c478dd5..b4452e7 100644 +--- a/resources/control-panel-resources.qrc ++++ b/resources/control-panel-resources.qrc +@@ -12,14 +12,14 @@ + images/trash-hover.svg + images/trash-pressed.svg + images/indicator-selected.png ++ images/current-avatar-indicator.svg ++ images/error-indicator.svg + + + + images/create-user-avatar.png + images/change-user-avatar.png + images/current-avatar-indicator.svg +- images/current-avatar-indicator.svg +- images/error-indicator.svg + images/finger-0.svg + images/finger-25.svg + images/finger-50.svg +-- +2.33.0 + diff --git a/kiran-control-panel.spec b/kiran-control-panel.spec index 9d0288a3e88967aa8f03052adb8d8f023b37132e..658c5b6d5c539f31acae7c1e24f3b6b2e31396bc 100644 --- a/kiran-control-panel.spec +++ b/kiran-control-panel.spec @@ -1,6 +1,6 @@ Name: kiran-control-panel Version: 2.3.4 -Release: 9 +Release: 10 Summary: Kiran Control Panel Summary(zh_CN): Kiran桌面控制面板 @@ -23,8 +23,9 @@ Patch0013: 0005-fix-network-fix-invalid-configuration-created-for-th.patch Patch0014: 0006-fix-network-only-L2TP-type-is-supported-temporary-an.patch Patch0015: 0007-feature-network-update-translations.patch Patch0016: 0001-feat-accessibleName-updates-accessiblename.patch -Patch0017: 0001-feature-audio-network-Add-labels-to-volume-and-netwo.patch -Patch0018: 0002-fix-network-Temporarily-do-not-overwrite-the-Network.patch +Patch0017: 0001-feature-audio-network-Add-labels-to-volume-and-netwo.patch +Patch0018: 0002-fix-network-Temporarily-do-not-overwrite-the-Network.patch +Patch0019: 0001-refactor-account-move-some-account-management-contro.patch BuildRequires: gcc-c++ @@ -186,6 +187,9 @@ make %{?_smp_mflags} rm -rf %{buildroot} %changelog +* Mon Sep 05 2022 liuxinhao - 2.3.4-10 +- KYOS-F: move some account management controls to common component library + * Thu Aug 25 2022 luoqing - 2.3.4-9 - KYOS-F: Add labels to volume and network plugins to support automated testing - KYOS-F: Temporarily do not overwrite the NetworkManager configuration and optimize the code