From bb140aa3c0d3365c0cdf22b5dd55fda804e44213 Mon Sep 17 00:00:00 2001 From: luoqing Date: Mon, 17 Apr 2023 15:53:54 +0800 Subject: [PATCH 1/4] feature(cmake & icon):add KiranNew icon selector in ui;Add compilation option switch, whether to enable network, volume, and user group plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在界面中添加KiranNew图标主题选择控件 增加编译选项开关,是否开启网络、音量和用户组插件 --- ...con-add-KiranNew-icon-selector-in-ui.patch | 94 +++++++++++++++++++ ...cmake-Add-compilation-option-switch-.patch | 84 +++++++++++++++++ kiran-control-panel.spec | 28 ++++-- 3 files changed, 198 insertions(+), 8 deletions(-) create mode 100644 0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch create mode 100644 0002-feature-options.cmake-Add-compilation-option-switch-.patch diff --git a/0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch b/0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch new file mode 100644 index 0000000..47a85d1 --- /dev/null +++ b/0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch @@ -0,0 +1,94 @@ +From 141c91b449bb0c4b90b30b48cb36756e8c4b6ced Mon Sep 17 00:00:00 2001 +From: yuanxing +Date: Thu, 13 Apr 2023 14:32:36 +0800 +Subject: [PATCH 1/2] fix(icon):add KiranNew icon selector in ui +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 在界面中添加KiranNew图标主题选择控件 +--- + .../pages/theme/icon-themes/icon-themes.cpp | 53 ++++++++++++++++++- + 1 file changed, 51 insertions(+), 2 deletions(-) + +diff --git a/plugins/appearance/src/pages/theme/icon-themes/icon-themes.cpp b/plugins/appearance/src/pages/theme/icon-themes/icon-themes.cpp +index 6e6f614..7dd60ac 100644 +--- a/plugins/appearance/src/pages/theme/icon-themes/icon-themes.cpp ++++ b/plugins/appearance/src/pages/theme/icon-themes/icon-themes.cpp +@@ -39,6 +39,14 @@ static QStringList icons{"accessories-calculator", + "user-info", + "preferences-desktop-wallpaper"}; + ++static QStringList kiranNewIcons{"kc-calculator", ++ "smplayer", ++ "firefox", ++ "thunderbird", ++ "utilities-terminal", ++ "brasero", ++ "accessories-text-editor"}; ++ + IconThemes::IconThemes(QWidget *parent) : QWidget(parent), + ui(new Ui::IconThemes) + { +@@ -167,7 +175,7 @@ void IconThemes::createIconWidgets() + for (int i = 0; i < m_iconThemes.size(); i++) + { + +- if (m_iconThemes.at(i).startsWith("Kiran", Qt::CaseInsensitive)) ++ if (!m_iconThemes.at(i).compare("Kiran", Qt::CaseInsensitive)) + { + QString path = m_iconThemesPath.at(i) + "/apps/scalable/"; + QDir appsDir = QDir(path); +@@ -208,7 +216,48 @@ void IconThemes::createIconWidgets() + else + continue; + } +- else if (m_iconThemes.at(i).startsWith("Adwaita", Qt::CaseInsensitive)) ++ else if (!m_iconThemes.at(i).compare("KiranNew", Qt::CaseInsensitive)) ++ { ++ QString path = m_iconThemesPath.at(i) + "/48x48/apps/"; ++ QDir appsDir = QDir(path); ++ QStringList iconList = appsDir.entryList(QDir::Files); ++ QStringList showIconsList; ++ if (appsDir.exists()) ++ { ++ for (int i = 0; i < kiranNewIcons.size(); i++) ++ { ++ if (iconList.contains(kiranNewIcons.at(i) + ".png")) ++ showIconsList.append(path + kiranNewIcons.at(i) + ".png"); ++ else ++ { ++ KLOG_INFO() << "not contain " << kiranNewIcons.at(i); ++ foreach (QString icon, iconList) ++ { ++ if (icon.startsWith(kiranNewIcons.at(i))) ++ { ++ showIconsList.append(path + icon); ++ break; ++ } ++ } ++ } ++ } ++ if (!showIconsList.isEmpty()) ++ { ++ //new theme-widget ++ ThemeWidget *themeWidget = new ThemeWidget(QSize(40, 40), m_currentIconTheme, ++ m_iconThemes.at(i), showIconsList); ++ vLayout->addWidget(themeWidget, Qt::AlignRight); ++ ++ if (m_iconThemes.at(i) == m_currentIconTheme) ++ m_iconThemeWidgetGroup->setCurrentWidget(themeWidget); ++ m_iconThemeWidgetGroup->addWidget(themeWidget); ++ themeWidget->setTheme(m_iconThemes.at(i)); ++ } ++ } ++ else ++ continue; ++ } ++ else if (!m_iconThemes.at(i).compare("Adwaita", Qt::CaseInsensitive)) + { + QString path = m_iconThemesPath.at(i) + "/48x48/apps/"; + QDir appsDir = QDir(path); +-- +2.33.0 + diff --git a/0002-feature-options.cmake-Add-compilation-option-switch-.patch b/0002-feature-options.cmake-Add-compilation-option-switch-.patch new file mode 100644 index 0000000..3ee38cd --- /dev/null +++ b/0002-feature-options.cmake-Add-compilation-option-switch-.patch @@ -0,0 +1,84 @@ +From 4b93ca3e5b8eed92c1dfc4468780733ded46a886 Mon Sep 17 00:00:00 2001 +From: luoqing +Date: Mon, 17 Apr 2023 10:20:11 +0800 +Subject: [PATCH 2/2] feature(options.cmake):Add compilation option switch, + whether to enable network, volume, and user group plugins +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 增加编译选项开关,是否开启网络、音量和用户组插件 +--- + CMakeLists.txt | 1 + + kcp_variables.cmake | 1 - + options.cmake | 3 +++ + plugins/CMakeLists.txt | 10 ++++++++-- + 4 files changed, 12 insertions(+), 3 deletions(-) + create mode 100644 options.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d053430..a437b57 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,6 +33,7 @@ pkg_search_module(QGSETTINGS REQUIRED gsettings-qt) + + include(kcp_variables.cmake) + include(kcp-qdbus-wrapper.cmake) ++include(options.cmake) + + configure_file(${CMAKE_SOURCE_DIR}/data/config.h.in ${CMAKE_BINARY_DIR}/config.h) + configure_file(${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.desktop.in ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop) +diff --git a/kcp_variables.cmake b/kcp_variables.cmake +index 0709a11..ae01d40 100644 +--- a/kcp_variables.cmake ++++ b/kcp_variables.cmake +@@ -10,7 +10,6 @@ set(KCP_INSTALL_INCLUDE ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${PR + set(SYSCONFDIR "/etc" CACHE PATH "Installation directory for configurations") + + set(KCP_PLUGIN_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include) +-OPTION(ENABLE_USER_GROUP "Enable user group" OFF) + + #根级分类安装路径 + set(CATEGORY_INSTALL_DIR ${INSTALL_DATADIR}/${PROJECT_NAME}/category) +diff --git a/options.cmake b/options.cmake +new file mode 100644 +index 0000000..1776e21 +--- /dev/null ++++ b/options.cmake +@@ -0,0 +1,3 @@ ++OPTION(ENABLE_USER_GROUP "Enable user group" OFF) ++OPTION(ENABLE_NETWORK "Enable network plugin" ON) ++OPTION(ENABLE_AUDIO "Enable audio plugin" ON) +\ No newline at end of file +diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt +index a55e816..c471259 100644 +--- a/plugins/CMakeLists.txt ++++ b/plugins/CMakeLists.txt +@@ -3,16 +3,22 @@ cmake_minimum_required(VERSION 3.2) + add_subdirectory(system) + add_subdirectory(power) + add_subdirectory(mouse) +-add_subdirectory(audio) + # add_subdirectory(greeter) + add_subdirectory(account) + add_subdirectory(keyboard) + add_subdirectory(timedate) +-add_subdirectory(network) + add_subdirectory(display) + add_subdirectory(keybinding) + add_subdirectory(appearance) + add_subdirectory(authentication) ++if(ENABLE_NETWORK) ++ add_subdirectory(network) ++endif() ++ ++if(ENABLE_AUDIO) ++ add_subdirectory(audio) ++endif() ++ + if(ENABLE_USER_GROUP) + add_subdirectory(group) + endif() +-- +2.33.0 + diff --git a/kiran-control-panel.spec b/kiran-control-panel.spec index 3479e18..3ab9fc7 100644 --- a/kiran-control-panel.spec +++ b/kiran-control-panel.spec @@ -7,6 +7,8 @@ Summary(zh_CN): Kiran桌面控制面板 License: MulanPSL-2.0 Source0: %{name}-%{version}.tar.gz Patch0: 0001-fix-translate-add-some-translation.patch +Patch1: 0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch +Patch2: 0002-feature-options.cmake-Add-compilation-option-switch-.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 3.2 @@ -104,7 +106,15 @@ Summary: Development files for kiran control panel plugin %build %{__mkdir} -p %{buildroot} -%cmake + +%if "%{ks_custom_name}" == "GC" + %cmake -DENABLE_USER_GROUP:BOOL=ON \ + -DENABLE_NETWORK:BOOL=OFF \ + -DENABLE_AUDIO:BOOL=OFF +%else + %cmake +%endif + make %{?_smp_mflags} %install @@ -123,14 +133,16 @@ make %{?_smp_mflags} %{_libexecdir}/kiran-avatar-editor %{_datadir}/kiran-cpanel-account/* -#audio -%{_sysconfdir}/xdg/autostart/kiran-audio-status-icon.desktop -%{_bindir}/kiran-audio-status-icon +%if "%{ks_custom_name}" != "GC" + #audio + %{_sysconfdir}/xdg/autostart/kiran-audio-status-icon.desktop + %{_bindir}/kiran-audio-status-icon -#network -%{_sysconfdir}/xdg/autostart/kiran-network-status-icon.desktop -%{_bindir}/kiran-network-status-icon -/etc/NetworkManager/conf.d/00-server.conf + #network + %{_sysconfdir}/xdg/autostart/kiran-network-status-icon.desktop + %{_bindir}/kiran-network-status-icon + /etc/NetworkManager/conf.d/00-server.conf +%endif %files -n kiran-cpanel-launcher %{_bindir}/kiran-cpanel-launcher From a6d6327ff4a0cea0c5e0356e09995079e33fc84e Mon Sep 17 00:00:00 2001 From: luoqing Date: Mon, 27 Mar 2023 17:55:49 +0800 Subject: [PATCH 2/4] fix(license info & audio): license information display in different colors;Fix an error where the sound output left/right balance function fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 激活信息已不同的显示进行显示 - 修复声音输出左/右平衡功能失效的错误 --- ...-license-information-display-in-diff.patch | 125 ++++++++++++++++++ ...-error-where-the-sound-output-left-r.patch | 75 +++++++++++ 2 files changed, 200 insertions(+) create mode 100644 0001-fix-license-info-license-information-display-in-diff.patch create mode 100644 0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch diff --git a/0001-fix-license-info-license-information-display-in-diff.patch b/0001-fix-license-info-license-information-display-in-diff.patch new file mode 100644 index 0000000..ab476df --- /dev/null +++ b/0001-fix-license-info-license-information-display-in-diff.patch @@ -0,0 +1,125 @@ +From aa8145a1e83cf4e0e4349728bd7f1f66d02684a0 Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 21 Feb 2023 16:47:56 +0800 +Subject: [PATCH 1/2] fix(license info): license information display in + different colors +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 激活信息已不同的显示进行显示 +--- + .../system-information/system-information.cpp | 40 +++++++++++-------- + 1 file changed, 24 insertions(+), 16 deletions(-) + +diff --git a/plugins/system/src/pages/system-information/system-information.cpp b/plugins/system/src/pages/system-information/system-information.cpp +index 0fb839f..c249b69 100644 +--- a/plugins/system/src/pages/system-information/system-information.cpp ++++ b/plugins/system/src/pages/system-information/system-information.cpp +@@ -19,6 +19,7 @@ + #include "ui_system-information.h" + + #include ++#include + #include + #include + #include +@@ -29,9 +30,7 @@ + #include + #include + #include +-#include + #include +-#include + + #define HOST_NAME "host_name" + #define ARCH "arch" +@@ -135,7 +134,7 @@ bool SystemInformation::initUI() + } + + QList kiranFrames = findChildren(); +- for (int i = 0; i < kiranFrames.count();i++) ++ for (int i = 0; i < kiranFrames.count(); i++) + { + KiranFrame* frame = kiranFrames.at(i); + frame->setRadius(6); +@@ -212,16 +211,19 @@ bool SystemInformation::getLicenseDesc(QString& licenseStatus) + QJsonObject rootObj = jsonDocument.object(); + QStringList keys = rootObj.keys(); + +- QSet keySet = {"expired_time","activation_status"}; +- for( auto key:keySet ) ++ QSet keySet = {"expired_time", "activation_status"}; ++ for (auto key : keySet) + { +- if( !keys.contains(key) ) ++ if (!keys.contains(key)) + { + KLOG_ERROR() << "KylinSecOS GetLicense missing key:" << key; + return false; + } + } + ++ bool expired = false; ++ QString statusDesc(""); ++ + QVariant expiredTimeVar = rootObj["expired_time"].toVariant(); + qlonglong expiredTimeSinceEpoch = expiredTimeVar.toULongLong(); + +@@ -229,27 +231,33 @@ bool SystemInformation::getLicenseDesc(QString& licenseStatus) + qulonglong activationStatus = activationStatusVar.toULongLong(); + + QDateTime expiredTime = QDateTime::fromSecsSinceEpoch(expiredTimeSinceEpoch); +- if (activationStatus == 0) //未激活 ++ if (activationStatus == 0) // 未激活 + { +- licenseStatus = tr("UnActivated"); ++ statusDesc = tr("UnActivated"); ++ expired = true; + } + else + { + QDateTime currentDateTime = QDateTime::currentDateTime(); + +- if( currentDateTime > expiredTime ) //激活码已过期 ++ if (currentDateTime > expiredTime) // 激活码已过期 + { +- licenseStatus = tr("Activation code has expired"); ++ statusDesc = tr("Activation code has expired"); ++ expired = true; + } +- else if( expiredTime.date().year() >= 2100 ) //永久激活 ++ else if (expiredTime.date().year() >= 2100) // 永久激活 + { +- licenseStatus = tr("Permanently activated"); ++ statusDesc = tr("Permanently activated"); ++ expired = false; + } +- else //已激活 ++ else // 已激活 + { +- licenseStatus = tr("Activated"); ++ statusDesc = tr("Activated"); ++ expired = false; + } + } ++ ++ licenseStatus = QString("%2").arg(expired?"#ff3838":"#5ab940").arg(statusDesc); + return true; + } + +@@ -285,9 +293,9 @@ void SystemInformation::updateHostName(bool isChanged, QString name) + + void SystemInformation::handleShowLicenseDialog() + { +- if( !QProcess::startDetached("/usr/bin/ksl-os-gui") ) ++ if (!QProcess::startDetached("/usr/bin/ksl-os-gui")) + { +- KiranMessageBox::message(this, tr("Error"), tr("Failed to open the license activator"),KiranMessageBox::Ok); ++ KiranMessageBox::message(this, tr("Error"), tr("Failed to open the license activator"), KiranMessageBox::Ok); + } + } + +-- +2.33.0 + diff --git a/0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch b/0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch new file mode 100644 index 0000000..864c342 --- /dev/null +++ b/0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch @@ -0,0 +1,75 @@ +From 73b3469f25ac345abb66621b9cb34cdd2839e3f6 Mon Sep 17 00:00:00 2001 +From: luoqing +Date: Mon, 27 Mar 2023 16:34:04 +0800 +Subject: [PATCH 2/2] fix(audio):Fix an error where the sound output left/right + balance function fails +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复声音输出左/右平衡功能失效的错误 +--- + plugins/audio/src/plugin/input-page.cpp | 4 ++-- + plugins/audio/src/plugin/output-page.cpp | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/plugins/audio/src/plugin/input-page.cpp b/plugins/audio/src/plugin/input-page.cpp +index e9f5018..00826b4 100644 +--- a/plugins/audio/src/plugin/input-page.cpp ++++ b/plugins/audio/src/plugin/input-page.cpp +@@ -256,7 +256,7 @@ void InputPage::initInputSettins() + + void InputPage::initConnet() + { +- connect(ui->inputDevices, static_cast(&QComboBox::activated), [=](int index) ++ connect(ui->inputDevices, static_cast(&QComboBox::activated), [this](int index) + { + QString namePort = ui->inputDevices->itemData(index, Qt::UserRole).toString(); + if (!namePort.isNull()) +@@ -272,7 +272,7 @@ void InputPage::initConnet() + else + KLOG_DEBUG() << "namePort is null"; }); + +- connect(ui->volumeSetting, &QSlider::valueChanged, [=](int value) ++ connect(ui->volumeSetting, &QSlider::valueChanged, [this](int value) + { + double volumeValue = static_cast(value) / static_cast(100); + if (m_defaultSource != nullptr) +diff --git a/plugins/audio/src/plugin/output-page.cpp b/plugins/audio/src/plugin/output-page.cpp +index b28ba53..ef52165 100644 +--- a/plugins/audio/src/plugin/output-page.cpp ++++ b/plugins/audio/src/plugin/output-page.cpp +@@ -167,7 +167,7 @@ void OutputPage::initConnect() + connect(m_audioInterface, &AudioInterface::SinkDelete, this, &OutputPage::handleSinkDelete); + connect(m_audioInterface, &AudioInterface::DefaultSinkChange, this, &OutputPage::handleDefaultSinkChanged, Qt::QueuedConnection); + +- connect(ui->outputDevices, static_cast(&QComboBox::currentIndexChanged), [=](int index) ++ connect(ui->outputDevices, static_cast(&QComboBox::currentIndexChanged), [this](int index) + { + QString namePort = ui->outputDevices->itemData(index, Qt::UserRole).toString(); + KLOG_DEBUG() << "SetActivePort:" << namePort; +@@ -176,7 +176,7 @@ void OutputPage::initConnect() + else + KLOG_DEBUG() << "m_defaultSink is null"; }); + +- connect(ui->volumeSetting, &QSlider::valueChanged, [=](int value) ++ connect(ui->volumeSetting, &QSlider::valueChanged, [this](int value) + { + double volumeValue = static_cast(ui->volumeSetting->sliderPosition()) / static_cast(100); + if(m_defaultSink != nullptr) +@@ -187,10 +187,10 @@ void OutputPage::initConnect() + else + KLOG_DEBUG() << "m_defaultSink is null"; }); + +- connect(ui->volumeBalance, &QSlider::valueChanged, [=](int value) ++ connect(ui->volumeBalance, &QSlider::valueChanged, [this](int value) + { + double balanceValue = static_cast(value) / static_cast(100); +- if (m_defaultSink == nullptr) ++ if (m_defaultSink != nullptr) + { + m_defaultSink->SetBalance(balanceValue); + KLOG_DEBUG() << "balanceValue" << balanceValue; +-- +2.33.0 + From 0031dd4c683238ebce37ed929dcc8452c48a72d8 Mon Sep 17 00:00:00 2001 From: wangyucheng Date: Mon, 10 Apr 2023 15:21:08 +0800 Subject: [PATCH 3/4] fix(translation) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加多语种翻译 --- ...-license-information-display-in-diff.patch | 125 ------------------ ...-error-where-the-sound-output-left-r.patch | 75 ----------- kiran-control-panel.spec | 3 + 3 files changed, 3 insertions(+), 200 deletions(-) delete mode 100644 0001-fix-license-info-license-information-display-in-diff.patch delete mode 100644 0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch diff --git a/0001-fix-license-info-license-information-display-in-diff.patch b/0001-fix-license-info-license-information-display-in-diff.patch deleted file mode 100644 index ab476df..0000000 --- a/0001-fix-license-info-license-information-display-in-diff.patch +++ /dev/null @@ -1,125 +0,0 @@ -From aa8145a1e83cf4e0e4349728bd7f1f66d02684a0 Mon Sep 17 00:00:00 2001 -From: liuxinhao -Date: Tue, 21 Feb 2023 16:47:56 +0800 -Subject: [PATCH 1/2] fix(license info): license information display in - different colors -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 激活信息已不同的显示进行显示 ---- - .../system-information/system-information.cpp | 40 +++++++++++-------- - 1 file changed, 24 insertions(+), 16 deletions(-) - -diff --git a/plugins/system/src/pages/system-information/system-information.cpp b/plugins/system/src/pages/system-information/system-information.cpp -index 0fb839f..c249b69 100644 ---- a/plugins/system/src/pages/system-information/system-information.cpp -+++ b/plugins/system/src/pages/system-information/system-information.cpp -@@ -19,6 +19,7 @@ - #include "ui_system-information.h" - - #include -+#include - #include - #include - #include -@@ -29,9 +30,7 @@ - #include - #include - #include --#include - #include --#include - - #define HOST_NAME "host_name" - #define ARCH "arch" -@@ -135,7 +134,7 @@ bool SystemInformation::initUI() - } - - QList kiranFrames = findChildren(); -- for (int i = 0; i < kiranFrames.count();i++) -+ for (int i = 0; i < kiranFrames.count(); i++) - { - KiranFrame* frame = kiranFrames.at(i); - frame->setRadius(6); -@@ -212,16 +211,19 @@ bool SystemInformation::getLicenseDesc(QString& licenseStatus) - QJsonObject rootObj = jsonDocument.object(); - QStringList keys = rootObj.keys(); - -- QSet keySet = {"expired_time","activation_status"}; -- for( auto key:keySet ) -+ QSet keySet = {"expired_time", "activation_status"}; -+ for (auto key : keySet) - { -- if( !keys.contains(key) ) -+ if (!keys.contains(key)) - { - KLOG_ERROR() << "KylinSecOS GetLicense missing key:" << key; - return false; - } - } - -+ bool expired = false; -+ QString statusDesc(""); -+ - QVariant expiredTimeVar = rootObj["expired_time"].toVariant(); - qlonglong expiredTimeSinceEpoch = expiredTimeVar.toULongLong(); - -@@ -229,27 +231,33 @@ bool SystemInformation::getLicenseDesc(QString& licenseStatus) - qulonglong activationStatus = activationStatusVar.toULongLong(); - - QDateTime expiredTime = QDateTime::fromSecsSinceEpoch(expiredTimeSinceEpoch); -- if (activationStatus == 0) //未激活 -+ if (activationStatus == 0) // 未激活 - { -- licenseStatus = tr("UnActivated"); -+ statusDesc = tr("UnActivated"); -+ expired = true; - } - else - { - QDateTime currentDateTime = QDateTime::currentDateTime(); - -- if( currentDateTime > expiredTime ) //激活码已过期 -+ if (currentDateTime > expiredTime) // 激活码已过期 - { -- licenseStatus = tr("Activation code has expired"); -+ statusDesc = tr("Activation code has expired"); -+ expired = true; - } -- else if( expiredTime.date().year() >= 2100 ) //永久激活 -+ else if (expiredTime.date().year() >= 2100) // 永久激活 - { -- licenseStatus = tr("Permanently activated"); -+ statusDesc = tr("Permanently activated"); -+ expired = false; - } -- else //已激活 -+ else // 已激活 - { -- licenseStatus = tr("Activated"); -+ statusDesc = tr("Activated"); -+ expired = false; - } - } -+ -+ licenseStatus = QString("%2").arg(expired?"#ff3838":"#5ab940").arg(statusDesc); - return true; - } - -@@ -285,9 +293,9 @@ void SystemInformation::updateHostName(bool isChanged, QString name) - - void SystemInformation::handleShowLicenseDialog() - { -- if( !QProcess::startDetached("/usr/bin/ksl-os-gui") ) -+ if (!QProcess::startDetached("/usr/bin/ksl-os-gui")) - { -- KiranMessageBox::message(this, tr("Error"), tr("Failed to open the license activator"),KiranMessageBox::Ok); -+ KiranMessageBox::message(this, tr("Error"), tr("Failed to open the license activator"), KiranMessageBox::Ok); - } - } - --- -2.33.0 - diff --git a/0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch b/0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch deleted file mode 100644 index 864c342..0000000 --- a/0002-fix-audio-Fix-an-error-where-the-sound-output-left-r.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 73b3469f25ac345abb66621b9cb34cdd2839e3f6 Mon Sep 17 00:00:00 2001 -From: luoqing -Date: Mon, 27 Mar 2023 16:34:04 +0800 -Subject: [PATCH 2/2] fix(audio):Fix an error where the sound output left/right - balance function fails -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复声音输出左/右平衡功能失效的错误 ---- - plugins/audio/src/plugin/input-page.cpp | 4 ++-- - plugins/audio/src/plugin/output-page.cpp | 8 ++++---- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/plugins/audio/src/plugin/input-page.cpp b/plugins/audio/src/plugin/input-page.cpp -index e9f5018..00826b4 100644 ---- a/plugins/audio/src/plugin/input-page.cpp -+++ b/plugins/audio/src/plugin/input-page.cpp -@@ -256,7 +256,7 @@ void InputPage::initInputSettins() - - void InputPage::initConnet() - { -- connect(ui->inputDevices, static_cast(&QComboBox::activated), [=](int index) -+ connect(ui->inputDevices, static_cast(&QComboBox::activated), [this](int index) - { - QString namePort = ui->inputDevices->itemData(index, Qt::UserRole).toString(); - if (!namePort.isNull()) -@@ -272,7 +272,7 @@ void InputPage::initConnet() - else - KLOG_DEBUG() << "namePort is null"; }); - -- connect(ui->volumeSetting, &QSlider::valueChanged, [=](int value) -+ connect(ui->volumeSetting, &QSlider::valueChanged, [this](int value) - { - double volumeValue = static_cast(value) / static_cast(100); - if (m_defaultSource != nullptr) -diff --git a/plugins/audio/src/plugin/output-page.cpp b/plugins/audio/src/plugin/output-page.cpp -index b28ba53..ef52165 100644 ---- a/plugins/audio/src/plugin/output-page.cpp -+++ b/plugins/audio/src/plugin/output-page.cpp -@@ -167,7 +167,7 @@ void OutputPage::initConnect() - connect(m_audioInterface, &AudioInterface::SinkDelete, this, &OutputPage::handleSinkDelete); - connect(m_audioInterface, &AudioInterface::DefaultSinkChange, this, &OutputPage::handleDefaultSinkChanged, Qt::QueuedConnection); - -- connect(ui->outputDevices, static_cast(&QComboBox::currentIndexChanged), [=](int index) -+ connect(ui->outputDevices, static_cast(&QComboBox::currentIndexChanged), [this](int index) - { - QString namePort = ui->outputDevices->itemData(index, Qt::UserRole).toString(); - KLOG_DEBUG() << "SetActivePort:" << namePort; -@@ -176,7 +176,7 @@ void OutputPage::initConnect() - else - KLOG_DEBUG() << "m_defaultSink is null"; }); - -- connect(ui->volumeSetting, &QSlider::valueChanged, [=](int value) -+ connect(ui->volumeSetting, &QSlider::valueChanged, [this](int value) - { - double volumeValue = static_cast(ui->volumeSetting->sliderPosition()) / static_cast(100); - if(m_defaultSink != nullptr) -@@ -187,10 +187,10 @@ void OutputPage::initConnect() - else - KLOG_DEBUG() << "m_defaultSink is null"; }); - -- connect(ui->volumeBalance, &QSlider::valueChanged, [=](int value) -+ connect(ui->volumeBalance, &QSlider::valueChanged, [this](int value) - { - double balanceValue = static_cast(value) / static_cast(100); -- if (m_defaultSink == nullptr) -+ if (m_defaultSink != nullptr) - { - m_defaultSink->SetBalance(balanceValue); - KLOG_DEBUG() << "balanceValue" << balanceValue; --- -2.33.0 - diff --git a/kiran-control-panel.spec b/kiran-control-panel.spec index 3ab9fc7..daf13ab 100644 --- a/kiran-control-panel.spec +++ b/kiran-control-panel.spec @@ -7,8 +7,11 @@ Summary(zh_CN): Kiran桌面控制面板 License: MulanPSL-2.0 Source0: %{name}-%{version}.tar.gz Patch0: 0001-fix-translate-add-some-translation.patch +<<<<<<< HEAD Patch1: 0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch Patch2: 0002-feature-options.cmake-Add-compilation-option-switch-.patch +======= +>>>>>>> 59cbeaf (fix(translation)) BuildRequires: gcc-c++ BuildRequires: cmake >= 3.2 From c7b770cbeda79a8b1ac6d0dc8132ed5c79e2cc4c Mon Sep 17 00:00:00 2001 From: wangyucheng Date: Sun, 23 Apr 2023 19:26:48 +0800 Subject: [PATCH 4/4] fix(*):Compatible for versions below 5.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 兼容5.14以下版本 去掉对 QPixmap pixmap(Qt::ReturnByValueConstant) 接口的使用 --- ...x-Compatible-for-versions-below-5.14.patch | 329 ++++++++++++++++++ kiran-control-panel.spec | 11 +- 2 files changed, 336 insertions(+), 4 deletions(-) create mode 100644 0003-fix-Compatible-for-versions-below-5.14.patch diff --git a/0003-fix-Compatible-for-versions-below-5.14.patch b/0003-fix-Compatible-for-versions-below-5.14.patch new file mode 100644 index 0000000..ed68386 --- /dev/null +++ b/0003-fix-Compatible-for-versions-below-5.14.patch @@ -0,0 +1,329 @@ +From 1c20cbda6f9dda373f77bbb5525b1ffd9ff9af13 Mon Sep 17 00:00:00 2001 +From: yuanxing +Date: Sun, 23 Apr 2023 10:07:32 +0800 +Subject: [PATCH] fix(*):Compatible for versions below 5.14 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 兼容5.14以下版本 + 去掉对 QPixmap pixmap(Qt::ReturnByValueConstant) 接口的使用 +--- + launcher/src/main.cpp | 6 +- + lib/plugin-framework/category.h | 3 +- + lib/plugin-framework/plugin-manager.cpp | 3 +- + plugins/appearance/src/appearance-subitem.h | 1 + + .../dbus-interface/appearance-global-info.cpp | 5 +- + plugins/appearance/src/pages/font/fonts.cpp | 136 +++++++++++++----- + plugins/authentication/src/auth-subitem.h | 2 + + plugins/keybinding/src/keycode-translator.cpp | 4 + + .../src/plugin/connection-itemwidget.cpp | 6 +- + plugins/network/src/tray/tray-itemwidget.cpp | 2 +- + 10 files changed, 123 insertions(+), 45 deletions(-) + +diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp +index eaeee99..1c6d6c6 100644 +--- a/launcher/src/main.cpp ++++ b/launcher/src/main.cpp +@@ -60,7 +60,11 @@ int main(int argc, char *argv[]) + QString lang = qgetenv("LANG"); + if(lang.contains(".")) + { +- QStringList splitRes = lang.split(".",Qt::SkipEmptyParts); ++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) ++ QStringList splitRes = lang.split(".", QString::SkipEmptyParts); ++#else ++ QStringList splitRes = lang.split(".", Qt::SkipEmptyParts); ++#endif + if(splitRes.size() == 2 && splitRes.at(1)!="UTF-8" ) + { + splitRes.replace(1,"UTF-8"); +diff --git a/lib/plugin-framework/category.h b/lib/plugin-framework/category.h +index 1e48a64..723c601 100644 +--- a/lib/plugin-framework/category.h ++++ b/lib/plugin-framework/category.h +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + #include "plugin-subitem-interface.h" + +@@ -74,4 +75,4 @@ private: + QVector m_subitems; + // 维系子功能项ID和功能项之前的映射关键 + QMap m_subitemIDMap; +-}; +\ No newline at end of file ++}; +diff --git a/lib/plugin-framework/plugin-manager.cpp b/lib/plugin-framework/plugin-manager.cpp +index 4444a55..3a8c50b 100644 +--- a/lib/plugin-framework/plugin-manager.cpp ++++ b/lib/plugin-framework/plugin-manager.cpp +@@ -15,6 +15,7 @@ + #include "plugin-loader.h" + + #include ++#include + + PluginManager* PluginManager::_instance = nullptr; + +@@ -71,4 +72,4 @@ void PluginManager::dump() + QList PluginManager::getPlugins() + { + return m_plugins; +-} +\ No newline at end of file ++} +diff --git a/plugins/appearance/src/appearance-subitem.h b/plugins/appearance/src/appearance-subitem.h +index bbec7d8..97b79f0 100644 +--- a/plugins/appearance/src/appearance-subitem.h ++++ b/plugins/appearance/src/appearance-subitem.h +@@ -2,6 +2,7 @@ + #define __APPEARANCE_SUBITEM_H__ + + #include ++#include + #include "panel-interface.h" + #include "plugin-subitem-interface.h" + +diff --git a/plugins/appearance/src/dbus-interface/appearance-global-info.cpp b/plugins/appearance/src/dbus-interface/appearance-global-info.cpp +index ab033d6..6913197 100644 +--- a/plugins/appearance/src/dbus-interface/appearance-global-info.cpp ++++ b/plugins/appearance/src/dbus-interface/appearance-global-info.cpp +@@ -206,8 +206,11 @@ bool AppearanceGlobalInfo::getFont(int type, QStringList &fontList) + fontInfo = reply.argumentAt(0).toString(); + KLOG_INFO() << "Font type is: " << type + << " Font info is:" << fontInfo; +- ++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) ++ fontInfoList = fontInfo.split(" ", QString::SkipEmptyParts); ++#else + fontInfoList = fontInfo.split(" ", Qt::SkipEmptyParts); ++#endif + if (!fontInfoList.isEmpty()) + { + fontSize = fontInfoList.takeLast(); +diff --git a/plugins/appearance/src/pages/font/fonts.cpp b/plugins/appearance/src/pages/font/fonts.cpp +index 41c184e..65e1b82 100644 +--- a/plugins/appearance/src/pages/font/fonts.cpp ++++ b/plugins/appearance/src/pages/font/fonts.cpp +@@ -150,42 +150,100 @@ void Fonts::connectSignals() + { + connect(AppearanceGlobalInfo::instance(), &AppearanceGlobalInfo::fontChanged, this, &Fonts::handleFontChanged); + +- connect(ui->cbox_application_font_name, &QComboBox::textActivated, [=](QString text) { +- m_applicationFontInfo.replace(0, text); +- KLOG_INFO() << "select applicationFont name = " << m_applicationFontInfo.at(0); +- KLOG_INFO() << "select applicationFont size = " << m_applicationFontInfo.at(1); +- setFont(APPEARANCE_FONT_TYPE_APPLICATION, m_applicationFontInfo); +- }); +- connect(ui->cbox_application_font_size, &QComboBox::textActivated, [=](QString text) { +- m_applicationFontInfo.replace(1, text); +- KLOG_INFO() << "select applicationFont name = " << m_applicationFontInfo.at(0); +- KLOG_INFO() << "select applicationFont size = " << m_applicationFontInfo.at(1); +- setFont(APPEARANCE_FONT_TYPE_APPLICATION, m_applicationFontInfo); +- }); +- connect(ui->cbox_monospace_font_name, &QComboBox::textActivated, [=](QString text) { +- m_monospaceFontInfo.replace(0, text); +- KLOG_INFO() << "monospaceFontInfo name = " << m_monospaceFontInfo.at(0); +- KLOG_INFO() << "monospaceFontInfo size = " << m_monospaceFontInfo.at(1); +- setFont(APPEARANCE_FONT_TYPE_MONOSPACE, m_monospaceFontInfo); +- }); +- connect(ui->cbox_monospace_font_size, &QComboBox::textActivated, [=](QString text) { +- m_monospaceFontInfo.replace(1, text); +- KLOG_INFO() << "monospaceFontInfo name = " << m_monospaceFontInfo.at(0); +- KLOG_INFO() << "monospaceFontInfo size = " << m_monospaceFontInfo.at(1); +- setFont(APPEARANCE_FONT_TYPE_MONOSPACE, m_monospaceFontInfo); +- }); +- connect(ui->cbox_titlebar_font_name, &QComboBox::textActivated, [=](QString text) { +- m_windowTitleFontInfo.replace(0, text); +- KLOG_INFO() << "windowTitleFontInfo name = " << m_windowTitleFontInfo.at(0); +- KLOG_INFO() << "windowTitleFontInfo size = " << m_windowTitleFontInfo.at(1); +- setFont(APPEARANCE_FONT_TYPE_WINDOW_TITLE, m_windowTitleFontInfo); +- }); +- connect(ui->cbox_titlebar_font_size, &QComboBox::textActivated, [=](QString text) { +- m_windowTitleFontInfo.replace(1, text); +- KLOG_INFO() << "windowTitleFont name = " << m_windowTitleFontInfo.at(0); +- KLOG_INFO() << "windowTitleFont size = " << m_windowTitleFontInfo.at(1); +- setFont(APPEARANCE_FONT_TYPE_WINDOW_TITLE, m_windowTitleFontInfo); +- }); ++#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) ++ connect(ui->cbox_application_font_name, &QComboBox::textActivated, [=](QString text) ++ { ++ m_applicationFontInfo.replace(0, text); ++ KLOG_INFO() << "select applicationFont name = " << m_applicationFontInfo.at(0); ++ KLOG_INFO() << "select applicationFont size = " << m_applicationFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_APPLICATION, m_applicationFontInfo); ++ }); ++ connect(ui->cbox_application_font_size, &QComboBox::textActivated, [=](QString text) ++ { ++ m_applicationFontInfo.replace(1, text); ++ KLOG_INFO() << "select applicationFont name = " << m_applicationFontInfo.at(0); ++ KLOG_INFO() << "select applicationFont size = " << m_applicationFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_APPLICATION, m_applicationFontInfo); ++ }); ++ connect(ui->cbox_monospace_font_name, &QComboBox::textActivated, [=](QString text) ++ { ++ m_monospaceFontInfo.replace(0, text); ++ KLOG_INFO() << "monospaceFontInfo name = " << m_monospaceFontInfo.at(0); ++ KLOG_INFO() << "monospaceFontInfo size = " << m_monospaceFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_MONOSPACE, m_monospaceFontInfo); ++ }); ++ connect(ui->cbox_monospace_font_size, &QComboBox::textActivated, [=](QString text) ++ { ++ m_monospaceFontInfo.replace(1, text); ++ KLOG_INFO() << "monospaceFontInfo name = " << m_monospaceFontInfo.at(0); ++ KLOG_INFO() << "monospaceFontInfo size = " << m_monospaceFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_MONOSPACE, m_monospaceFontInfo); ++ }); ++ connect(ui->cbox_titlebar_font_name, &QComboBox::textActivated, [=](QString text) ++ { ++ m_windowTitleFontInfo.replace(0, text); ++ KLOG_INFO() << "windowTitleFontInfo name = " << m_windowTitleFontInfo.at(0); ++ KLOG_INFO() << "windowTitleFontInfo size = " << m_windowTitleFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_WINDOW_TITLE, m_windowTitleFontInfo); ++ }); ++ connect(ui->cbox_titlebar_font_size, &QComboBox::textActivated, [=](QString text) ++ { ++ m_windowTitleFontInfo.replace(1, text); ++ KLOG_INFO() << "windowTitleFont name = " << m_windowTitleFontInfo.at(0); ++ KLOG_INFO() << "windowTitleFont size = " << m_windowTitleFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_WINDOW_TITLE, m_windowTitleFontInfo); ++ }); ++#else ++ connect(ui->cbox_application_font_name, QOverload::of(&QComboBox::activated), ++ [=](const QString text) ++ { ++ m_applicationFontInfo.replace(0, text); ++ KLOG_INFO() << "select applicationFont name = " << m_applicationFontInfo.at(0); ++ KLOG_INFO() << "select applicationFont size = " << m_applicationFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_APPLICATION, m_applicationFontInfo); ++ }); ++ connect(ui->cbox_application_font_size, QOverload::of(&QComboBox::activated), ++ [=](const QString text) ++ { ++ m_applicationFontInfo.replace(1, text); ++ KLOG_INFO() << "select applicationFont name = " << m_applicationFontInfo.at(0); ++ KLOG_INFO() << "select applicationFont size = " << m_applicationFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_APPLICATION, m_applicationFontInfo); ++ }); ++ connect(ui->cbox_monospace_font_name, QOverload::of(&QComboBox::activated), ++ [=](const QString text) ++ { ++ m_monospaceFontInfo.replace(0, text); ++ KLOG_INFO() << "monospaceFontInfo name = " << m_monospaceFontInfo.at(0); ++ KLOG_INFO() << "monospaceFontInfo size = " << m_monospaceFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_MONOSPACE, m_monospaceFontInfo); ++ ++ }); ++ connect(ui->cbox_monospace_font_size, QOverload::of(&QComboBox::activated), ++ [=](const QString text) ++ { ++ m_monospaceFontInfo.replace(1, text); ++ KLOG_INFO() << "monospaceFontInfo name = " << m_monospaceFontInfo.at(0); ++ KLOG_INFO() << "monospaceFontInfo size = " << m_monospaceFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_MONOSPACE, m_monospaceFontInfo); ++ }); ++ connect(ui->cbox_titlebar_font_name, QOverload::of(&QComboBox::activated), ++ [=](const QString text) ++ { ++ m_windowTitleFontInfo.replace(0, text); ++ KLOG_INFO() << "windowTitleFontInfo name = " << m_windowTitleFontInfo.at(0); ++ KLOG_INFO() << "windowTitleFontInfo size = " << m_windowTitleFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_WINDOW_TITLE, m_windowTitleFontInfo); ++ }); ++ connect(ui->cbox_titlebar_font_size, QOverload::of(&QComboBox::activated), ++ [=](const QString text) ++ { ++ m_windowTitleFontInfo.replace(1, text); ++ KLOG_INFO() << "windowTitleFont name = " << m_windowTitleFontInfo.at(0); ++ KLOG_INFO() << "windowTitleFont size = " << m_windowTitleFontInfo.at(1); ++ setFont(APPEARANCE_FONT_TYPE_WINDOW_TITLE, m_windowTitleFontInfo); ++ }); ++#endif + } + + void Fonts::showFontInfo(QComboBox* nameParent, QComboBox* sizeParent, QString name, QString size) +@@ -222,7 +280,11 @@ void Fonts::showFontInfo(QComboBox* nameParent, QComboBox* sizeParent, QString n + + void Fonts::handleFontChanged(int type, QString fontInfo) + { ++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) ++ QStringList fontInfoList = fontInfo.split(" ", QString::SkipEmptyParts); ++#else + QStringList fontInfoList = fontInfo.split(" ", Qt::SkipEmptyParts); ++#endif + QString fontSize = fontInfoList.takeLast(); + QString fontName = fontInfoList.join(" "); + KLOG_INFO() << "font changed : " << type << ",name: " << fontName << ",size: " << fontSize; +@@ -267,5 +329,5 @@ void Fonts::handleFontChanged(int type, QString fontInfo) + + QSize Fonts::sizeHint() const + { +- return {500,657}; ++ return {500, 657}; + } +diff --git a/plugins/authentication/src/auth-subitem.h b/plugins/authentication/src/auth-subitem.h +index e09a3c8..3aa7f1f 100644 +--- a/plugins/authentication/src/auth-subitem.h ++++ b/plugins/authentication/src/auth-subitem.h +@@ -1,6 +1,8 @@ + #pragma once + + #include ++#include ++#include + #include "panel-interface.h" + #include "plugin-subitem-interface.h" + +diff --git a/plugins/keybinding/src/keycode-translator.cpp b/plugins/keybinding/src/keycode-translator.cpp +index c75ee07..f692fef 100644 +--- a/plugins/keybinding/src/keycode-translator.cpp ++++ b/plugins/keybinding/src/keycode-translator.cpp +@@ -146,7 +146,11 @@ QString KeycodeTranslator::backendKeyString2Readable(const QString &keyString) + QString temp = keyString; + temp = temp.replace("<",""); + temp = temp.replace(">","-"); ++#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) ++ QStringList keyList = temp.split("-", QString::SkipEmptyParts); ++#else + QStringList keyList = temp.split("-",Qt::SkipEmptyParts); ++#endif + for(int i=0;ipixmap(Qt::ReturnByValue)); +- if (!pixmap.isNull()) +- m_connectionTypeIcon->setPixmap(pixmap); ++ QImage image = m_connectionTypeIcon->pixmap()->toImage(); ++ image.invertPixels(QImage::InvertRgb); ++ m_connectionTypeIcon->setPixmap(QPixmap::fromImage(image)); + m_editButton->setIcon(NetworkUtils::trayIconColorSwitch(":/kcp-network-images/details-info.svg")); + } + +diff --git a/plugins/network/src/tray/tray-itemwidget.cpp b/plugins/network/src/tray/tray-itemwidget.cpp +index 2f85842..19c79af 100644 +--- a/plugins/network/src/tray/tray-itemwidget.cpp ++++ b/plugins/network/src/tray/tray-itemwidget.cpp +@@ -297,7 +297,7 @@ void TrayItemWidget::paintEvent(QPaintEvent *event) + + void TrayItemWidget::handleThemeChanged(Kiran::PaletteType paletteType) + { +- QImage image = ui->connectionTypeIcon->pixmap(Qt::ReturnByValue).toImage(); ++ QImage image = ui->connectionTypeIcon->pixmap()->toImage(); + image.invertPixels(QImage::InvertRgb); + QPixmap pixmap = QPixmap::fromImage(image); + ui->connectionTypeIcon->setPixmap(pixmap); +-- +2.33.0 + diff --git a/kiran-control-panel.spec b/kiran-control-panel.spec index daf13ab..4bb6e37 100644 --- a/kiran-control-panel.spec +++ b/kiran-control-panel.spec @@ -1,17 +1,15 @@ Name: kiran-control-panel Version: 2.5.0 -Release: 2 +Release: 3 Summary: Kiran Control Panel Summary(zh_CN): Kiran桌面控制面板 License: MulanPSL-2.0 Source0: %{name}-%{version}.tar.gz Patch0: 0001-fix-translate-add-some-translation.patch -<<<<<<< HEAD Patch1: 0001-fix-icon-add-KiranNew-icon-selector-in-ui.patch Patch2: 0002-feature-options.cmake-Add-compilation-option-switch-.patch -======= ->>>>>>> 59cbeaf (fix(translation)) +Patch3: 0003-fix-Compatible-for-versions-below-5.14.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 3.2 @@ -21,6 +19,8 @@ BuildRequires: zeromq-devel BuildRequires: libnotify-devel BuildRequires: pam-devel BuildRequires: cryptopp-devel +BuildRequires: libXrandr-devel +BuildRequires: libXcursor-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtx11extras-devel @@ -159,6 +159,9 @@ make %{?_smp_mflags} rm -rf %{buildroot} %changelog +* Sun Apr 23 2023 wangyucheng - 2.5.0-3 +- KYOS-F: Compatible for versions below 5.14 + * Mon Apr 10 2023 wangyucheng - 2.5.0-2 - KYOS-T: add some translation