Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
94b794b402
!202 sync from 24.03-LTS
From: @peijiankang 
Reviewed-by: @hua_yadong 
Signed-off-by: @hua_yadong
2024-11-21 06:38:43 +00:00
peijiankang
02c7e2e9a5 sync form 24.03-LTS 2024-11-20 14:00:14 +08:00
openeuler-ci-bot
8890ecbc78
!188 fix build error of ddcutil-2.0.0
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2024-01-30 03:29:27 +00:00
peijiankang
170fa72810 fix build error of ddcutil-2.0.0 2024-01-29 15:20:11 +08:00
openeuler-ci-bot
54884d3da6
!187 [sync] PR-186: update-formats_loacle-and-language.patch
From: @openeuler-sync-bot 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-09-25 03:10:24 +00:00
peijiankang
1e26d65128 add update-formats_loacle-and-language.patch
(cherry picked from commit aa25bb8f6ec6de6ae69fbf124d4f9fe94664a62d)
2023-09-25 10:41:12 +08:00
openeuler-ci-bot
9a517453af
!181 sync patch from upstream
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2023-09-15 08:15:18 +00:00
peijiankang
d2a8571c2a sync patch from upstream 2023-09-15 14:39:57 +08:00
openeuler-ci-bot
ef3aff2a8b
!179 fix clang build error
From: @mdLUbG 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-09-15 06:23:10 +00:00
s
e45b2b686f fix clang build error 2023-09-08 17:11:12 +08:00
13 changed files with 1083 additions and 4 deletions

View File

@ -0,0 +1,59 @@
From 4a7799b78457d9fa9017fa5a2f5b0d4c4c7ec9af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Tue, 25 Jun 2024 14:21:22 +0800
Subject: [PATCH] fix object created in wrong thread
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
plugins/time-language/datetime/datetime.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/plugins/time-language/datetime/datetime.cpp b/plugins/time-language/datetime/datetime.cpp
index 86e0518..e657a08 100644
--- a/plugins/time-language/datetime/datetime.cpp
+++ b/plugins/time-language/datetime/datetime.cpp
@@ -783,6 +783,12 @@ void DateTime::synctimeFormatSlot(bool status,bool outChange)
connect(syncThread, &CGetSyncRes::finished, this, [=](){
syncThread->deleteLater();
ui->radioButton_2->setEnabled(true);
+ if (syncThreadFlag == false) { //创建线程一直查时间同步是否成功
+ CSyncTime *syncTimeThread = new CSyncTime(this,successMSG,failMSG);
+ connect(syncTimeThread,SIGNAL(finished()),syncTimeThread,SLOT(deleteLater()));
+ syncTimeThread->start();
+ syncThreadFlag = true;
+ }
});
syncThread->start();
ui->radioButton_2->setEnabled(false);
@@ -954,6 +960,7 @@ CGetSyncRes::~CGetSyncRes()
}
void CGetSyncRes::run()
{
+ syncThreadFlag = false;
for(qint8 i = 0; i < 80; ++i) {
if (this->dataTimeUI->getSyncStatus() == false) {
this->dataTimeUI->syncNetworkRetLabel->setText("");
@@ -971,16 +978,11 @@ void CGetSyncRes::run()
} else { //同步时间成功
DateTime::syncRTC();
this->dataTimeUI->syncNetworkRetLabel->setText(successMSG);
+ syncThreadFlag = true;
return;
}
}
this->dataTimeUI->syncNetworkRetLabel->setText(failMSG);
- if (syncThreadFlag == false) { //创建线程一直查时间同步是否成功
- CSyncTime *syncTimeThread = new CSyncTime(this->dataTimeUI,successMSG,failMSG);
- connect(syncTimeThread,SIGNAL(finished()),syncTimeThread,SLOT(deleteLater()));
- syncTimeThread->start();
- syncThreadFlag = true;
- }
return;
}
--
2.33.0

View File

@ -0,0 +1,38 @@
From 582a7b5cfa58e1036b4a60b9d651c50d5da6fd00 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 19 Jun 2023 17:03:10 +0800
Subject: [PATCH] Turn off activation button hide operation
---
plugins/system/about/about.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp
index 3917b6b..3d474fa 100644
--- a/plugins/system/about/about.cpp
+++ b/plugins/system/about/about.cpp
@@ -50,6 +50,8 @@
#include <QStorageInfo>
#include <QtMath>
+#include "../../../shell/utils/utils.h"
+
About::About() : mFirstLoad(true)
{
pluginName = tr("About");
@@ -683,8 +685,10 @@ void About::setupSerialComponent()
}
mSequenceLabel_2->setText(serial);
mSequenceLabel_2->setStyleSheet("color : #2FB3E8");
- if (serial.isEmpty())
- mActivationBtn->hide();
+ if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){
+ if (serial.isEmpty())
+ mActivationBtn->hide();
+ }
if (status == 0) { //未激活 激活或未激活应通过status判断
if (!trial_dateRes.isEmpty()) { //试用期
mStatusLabel_2->setText(tr("Inactivated"));
--
2.33.0

View File

@ -0,0 +1,490 @@
From 9c4097314c5e50eca8042ec8b846a0eb53e1f171 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Wed, 21 Jun 2023 16:59:26 +0800
Subject: [PATCH] add information for about
---
plugins/system/about/about.cpp | 115 +++++++++++++++++++++++--------
plugins/system/about/about.h | 2 +
shell/res/i18n/zh_CN.ts | 122 +++++++++++++++++++++------------
3 files changed, 165 insertions(+), 74 deletions(-)
diff --git a/plugins/system/about/about.cpp b/plugins/system/about/about.cpp
index 3d474fa..4d6af71 100644
--- a/plugins/system/about/about.cpp
+++ b/plugins/system/about/about.cpp
@@ -470,6 +470,15 @@ void About::initUI(QWidget *widget)
QString currentyear("2023");
mTipLabel = new FixLabel(QString(tr("Copyright © 2009-%1 KylinSoft. All rights reserved.")).arg(currentyear) , Aboutwidget);
mTipLabel->setContentsMargins(16 , 0 , 0 , 0);
+
+ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin
+ mKindLabel = new FixLabel(QString(tr("Kind reminder: If you have any questions, please consult sales\n"
+ "Consultation hotline: 400-089-1870")), Aboutwidget);
+ mKindLabel->setContentsMargins(16 , 0 , 0 , 0);
+
+ mWebLabel = new FixLabel(QString(tr("Company website: https://www.kylinos.cn")), Aboutwidget);
+ mWebLabel->setContentsMargins(16 , 0 , 0 , 0);
+ }
mBtnFrame = new QFrame(Aboutwidget);
mBtnFrame->setMinimumSize(QSize(550, 0));
@@ -543,7 +552,13 @@ void About::initUI(QWidget *widget)
AboutLayout->addWidget(mInformationFrame);
AboutLayout->addWidget(mActivationFrame);
- AboutLayout->addWidget(mTipLabel);
+ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin
+ AboutLayout->addWidget(mKindLabel);
+ AboutLayout->addWidget(mTipLabel);
+ AboutLayout->addWidget(mWebLabel);
+ }else{
+ AboutLayout->addWidget(mTipLabel);
+ }
item = new QSpacerItem(10 , 32);
AboutLayout->addSpacerItem(item);
// AboutLayout->addSpacing(32);
@@ -683,36 +698,74 @@ void About::setupSerialComponent()
if (trial_dateReply.type() == QDBusMessage::ReplyMessage) {
trial_dateRes = trial_dateReply.arguments().at(0).toString();
}
- mSequenceLabel_2->setText(serial);
- mSequenceLabel_2->setStyleSheet("color : #2FB3E8");
- if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){
+ if(Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//社区
+ mSequenceLabel_2->setText(serial);
+ mSequenceLabel_2->setStyleSheet("color : #2FB3E8");
if (serial.isEmpty())
mActivationBtn->hide();
- }
- if (status == 0) { //未激活 激活或未激活应通过status判断
- if (!trial_dateRes.isEmpty()) { //试用期
- mStatusLabel_2->setText(tr("Inactivated"));
- mStatusLabel_2->setStyleSheet("color : red ");
- mTimeLabel_1->setText(tr("Trial expiration time"));
- mTimeLabel_2->setText(trial_dateRes);
- mActivationBtn->setText(tr("Active"));
- activestatus = false;
- } else {
- mTimeLabel_1->hide();
- mTimeLabel_2->hide();
- mStatusLabel_2->setText(tr("Inactivated"));
- mStatusLabel_2->setStyleSheet("color : red ");
- mActivationBtn->setText(tr("Active"));
- }
- } else { //已激活
- mActivationBtn->hide();
- mTrialLabel->hide();
- mAndLabel->hide();
- mStatusLabel_2->setStyleSheet("");
- mStatusLabel_2->setText(tr("Activated"));
- mTimeLabel_2->setText(dateRes);
- mActivationBtn->setText(tr("Extend"));
- mActivationBtn->show();
+ if (status == 0) { //未激活 激活或未激活应通过status判断
+ if (!trial_dateRes.isEmpty()) { //试用期
+ mStatusLabel_2->setText(tr("Inactivated"));
+ mStatusLabel_2->setStyleSheet("color : red ");
+ mTimeLabel_1->setText(tr("Trial expiration time"));
+ mTimeLabel_2->setText(trial_dateRes);
+ mActivationBtn->setText(tr("Active"));
+ activestatus = false;
+ } else {
+ mTimeLabel_1->hide();
+ mTimeLabel_2->hide();
+ mStatusLabel_2->setText(tr("Inactivated"));
+ mStatusLabel_2->setStyleSheet("color : red ");
+ mActivationBtn->setText(tr("Active"));
+ }
+ } else { //已激活
+ mActivationBtn->hide();
+ mTrialLabel->hide();
+ mAndLabel->hide();
+ mStatusLabel_2->setStyleSheet("");
+ mStatusLabel_2->setText(tr("Activated"));
+ mTimeLabel_2->setText(dateRes);
+ mActivationBtn->setText(tr("Extend"));
+ mActivationBtn->show();
+ }
+ }else{//kylin
+ if (status == 0) { //未激活 激活或未激活应通过status判断
+ if (!trial_dateRes.isEmpty()) { //试用期
+ mStatusLabel_2->setText(tr("Inactivated"));
+ mStatusLabel_2->setStyleSheet("color : red ");
+ mTimeLabel_1->setText(tr("Trial expiration time"));
+ mTimeLabel_2->setText(trial_dateRes);
+ mActivationBtn->setText(tr("Active"));
+ activestatus = false;
+ } else {
+ mStatusLabel_2->setText(tr("Inactivated"));
+ mStatusLabel_2->setStyleSheet("color : red ");
+ mTimeLabel_1->setText(tr("Trial expiration time"));
+ mTimeLabel_2->setText(tr("Unknow"));
+ mActivationBtn->setText(tr("Active"));
+ }
+ } else { //已激活
+ mActivationBtn->hide();
+ mTrialLabel->hide();
+ mAndLabel->hide();
+ mStatusLabel_2->setStyleSheet("");
+ mStatusLabel_2->setText(tr("Activated"));
+ mTimeLabel_1->setText(tr("Service expiration time"));
+ mTimeLabel_2->setText(dateRes);
+ mActivationBtn->setText(tr("Extend"));
+ mActivationBtn->show();
+ }
+ if (serial.isEmpty()){
+ mTimeLabel_1->hide();
+ mTimeLabel_2->hide();
+ mSequenceLabel_2->setText(tr("Unknow"));
+ mSequenceLabel_2->setStyleSheet("color : #2FB3E8");
+ }else{
+ mTimeLabel_1->show();
+ mTimeLabel_2->show();
+ mSequenceLabel_2->setText(serial);
+ mSequenceLabel_2->setStyleSheet("color : #2FB3E8");
+ }
}
connect(mActivationBtn, &QPushButton::clicked, this, &About::runActiveWindow);
}
@@ -995,6 +1048,10 @@ void About::setupSystemVersion()
mAgreeLabel->hide();
mActivationFrame->hide();
mTipLabel->hide();
+ if(!Utils::getCommunity().compare("kylin", Qt::CaseSensitive)){//kylin
+ mKindLabel->hide();
+ mWebLabel->hide();
+ }
mTrialLabel->hide();
}
diff --git a/plugins/system/about/about.h b/plugins/system/about/about.h
index c2571ac..c2d44a3 100644
--- a/plugins/system/about/about.h
+++ b/plugins/system/about/about.h
@@ -169,7 +169,9 @@ private:
QLabel *mHpLabel;
FixLabel *mEducateIconLabel;
QLabel *mEducateLabel;
+ FixLabel *mKindLabel;
FixLabel *mTipLabel;
+ FixLabel *mWebLabel;
diff --git a/shell/res/i18n/zh_CN.ts b/shell/res/i18n/zh_CN.ts
index db8f2f2..8d6b862 100644
--- a/shell/res/i18n/zh_CN.ts
+++ b/shell/res/i18n/zh_CN.ts
@@ -4,94 +4,106 @@
<context>
<name>About</name>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="564"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="581"/>
<source>System Summary</source>
<translation>系统概述</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="565"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="582"/>
<source>Support</source>
<translation>支持</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="206"/>
- <location filename="../../../plugins/system/about/about.cpp" line="566"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="208"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="583"/>
<source>Version Number</source>
<translation>版本号</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="627"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="644"/>
<source>Status</source>
<translation>系统状态</translation>
<extra-contents_path>/About/Status</extra-contents_path>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="629"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="646"/>
<source>DateRes</source>
<translation>服务到期时间</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="569"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="586"/>
<source>Wechat code scanning obtains HP professional technical support</source>
<translation>微信扫码获得HP专业技术支持</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="268"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="270"/>
<source>HostName</source>
<translation>计算机名</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="570"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="587"/>
<source>See more about Kylin Tianqi edu platform</source>
<translation>查看麒麟天启教育平台更多信息</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="479"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="490"/>
<source>&lt;&lt;Protocol&gt;&gt;</source>
<translation>《试用免责协议》</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="226"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="228"/>
<source>InterVersion</source>
<translation>内部版本</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="409"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="411"/>
<source>Privacy and agreement</source>
<translation>隐私和协议</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="419"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="421"/>
<source>Send optional diagnostic data</source>
<translation>发送可选诊断数据</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="421"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="423"/>
<source>By sending us diagnostic data, improve the system experience and solve your problems faster</source>
<translation>通过向我们发送诊断数据,提升系统体验以及更快的解决你的问题</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="469"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="475"/>
+ <source>Kind reminder: If you have any questions, please consult sales
+Consultation hotline: 400-089-1870</source>
+ <translation>温馨提示:如有问题请咨询销售
+咨询电话400-089-1870</translation>
+ </message>
+ <message>
+ <location filename="../../../plugins/system/about/about.cpp" line="471"/>
<source>Copyright © 2009-%1 KylinSoft. All rights reserved.</source>
<translation>版权所有 © 2009-%1 麒麟软件 保留所有权利。</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="480"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="479"/>
+ <source>Company website: https://www.kylinos.cn</source>
+ <translation>公司网站https://www.kylinos.cn</translation>
+ </message>
+ <message>
+ <location filename="../../../plugins/system/about/about.cpp" line="491"/>
<source>and</source>
<translation>和</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="481"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="492"/>
<source>&lt;&lt;Privacy&gt;&gt;</source>
<translation>《用户隐私协议》</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="591"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="608"/>
<source>Learn more HP user manual&gt;&gt;</source>
<translation>了解更多 Hp用户手册&gt;&gt;</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="601"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="618"/>
<source>See user manual&gt;&gt;</source>
<translation>查看用户手册</translation>
</message>
@@ -100,34 +112,48 @@
<translation type="vanished">未激活(试用期)</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="692"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="710"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="736"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="743"/>
<source>Trial expiration time</source>
<translation>试用到期时间</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="1040"/>
- <location filename="../../../plugins/system/about/about.cpp" line="1279"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="744"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="761"/>
+ <source>Unknow</source>
+ <translation>未知</translation>
+ </message>
+ <message>
+ <location filename="../../../plugins/system/about/about.cpp" line="1102"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1341"/>
<source>expired</source>
<translation>已过期</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="710"/>
- <location filename="../../../plugins/system/about/about.cpp" line="1044"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="753"/>
+ <source>Service expiration time</source>
+ <translation>服务到期时间</translation>
+ </message>
+ <message>
+ <location filename="../../../plugins/system/about/about.cpp" line="728"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="755"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1111"/>
<source>Extend</source>
<translation>延长服务</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="1236"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1303"/>
<source>The system needs to be restarted to set the HostName, whether to reboot</source>
<translation>计算机名已被修改,需要重启系统才可正常使用。建议立即重启系统!</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="1237"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1304"/>
<source>Reboot Now</source>
<translation>立即重启</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="1238"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1305"/>
<source>Reboot Later</source>
<translation>稍后重启</translation>
</message>
@@ -140,9 +166,9 @@
<translation type="vanished">延长服务</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="947"/>
- <location filename="../../../plugins/system/about/about.cpp" line="956"/>
- <location filename="../../../plugins/system/about/about.cpp" line="1405"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1010"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1019"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1472"/>
<source>avaliable</source>
<translation>可用</translation>
</message>
@@ -159,7 +185,7 @@
<translation type="vanished">版权所有2009-2021@kylinos保留所有权利</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="615"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="632"/>
<source>Version</source>
<translation>版本名称</translation>
<extra-contents_path>/About/version</extra-contents_path>
@@ -177,37 +203,37 @@
<translation type="vanished">版权所有 © 2009-2021 麒麟软件 保留所有权利。</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="617"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="634"/>
<source>Kernel</source>
<translation>内核</translation>
<extra-contents_path>/About/Kernel</extra-contents_path>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="619"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="636"/>
<source>CPU</source>
<translation>CPU</translation>
<extra-contents_path>/About/CPU</extra-contents_path>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="621"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="638"/>
<source>Memory</source>
<translation>内存</translation>
<extra-contents_path>/About/Memory</extra-contents_path>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="567"/>
- <location filename="../../../plugins/system/about/about.cpp" line="954"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="584"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="1017"/>
<source>Disk</source>
<translation>硬盘</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="623"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="640"/>
<source>Desktop</source>
<translation>桌面</translation>
<extra-contents_path>/About/Desktop</extra-contents_path>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="625"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="642"/>
<source>User</source>
<translation>用户名</translation>
<extra-contents_path>/About/User</extra-contents_path>
@@ -221,7 +247,7 @@
<translation type="vanished">有效期</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="628"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="645"/>
<source>Serial</source>
<translation>序列号</translation>
</message>
@@ -234,8 +260,10 @@
<translation type="vanished">序列号</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="694"/>
- <location filename="../../../plugins/system/about/about.cpp" line="701"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="712"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="719"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="738"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="745"/>
<source>Active</source>
<translation>激活</translation>
</message>
@@ -252,7 +280,7 @@
<translation type="vanished">关于</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="55"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="57"/>
<source>About</source>
<translation>关于</translation>
</message>
@@ -269,13 +297,16 @@
<translation type="vanished">可用</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="690"/>
- <location filename="../../../plugins/system/about/about.cpp" line="699"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="708"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="717"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="734"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="741"/>
<source>Inactivated</source>
<translation>未激活</translation>
</message>
<message>
- <location filename="../../../plugins/system/about/about.cpp" line="708"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="726"/>
+ <location filename="../../../plugins/system/about/about.cpp" line="752"/>
<source>Activated</source>
<translation>已激活</translation>
</message>
@@ -418,6 +449,7 @@
<name>AddBtn</name>
<message>
<location filename="../../../libukcc/widgets/AddBtn/addbtn.cpp" line="20"/>
+ <location filename="../../component/AddBtn/addbtn.cpp" line="20"/>
<source>Add</source>
<translation>添加</translation>
</message>
--
2.33.0

99
add-ukcc-setlang.patch Normal file
View File

@ -0,0 +1,99 @@
From 19bc5d463a5a3ea11961b999982eb033cea532b6 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Thu, 29 Jun 2023 10:38:35 +0800
Subject: [PATCH] add ukcc-setlang
---
plugins/time-language/area/area.cpp | 9 ++++++++-
plugins/time-language/area/area.pro | 5 ++++-
plugins/time-language/area/ukcc-setlang.sh | 15 +++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 plugins/time-language/area/ukcc-setlang.sh
diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp
index 15e5b8e..a6b6bf7 100644
--- a/plugins/time-language/area/area.cpp
+++ b/plugins/time-language/area/area.cpp
@@ -27,6 +27,7 @@
#include <QTimer>
#include <QGSettings>
#include <QMessageBox>
+#include <QProcess>
#include "languageFrame.h"
#include "../../../shell/component/Frame/hlineframe.h"
@@ -202,12 +203,16 @@ void Area::initLanguage()
connect(chineseFrame, &LanguageFrame::clicked, this, [=](){
englishFrame->showSelectedIcon(false);
m_areaInterface->call("SetLanguage","zh_CN.UTF-8");
+ QString cmdtest = QString("bash /usr/bin/ukcc-setlang.sh %1").arg("zh_CN.UTF-8");
+ QProcess::execute (cmdtest);
showMessageBox(2);
});
connect(englishFrame, &LanguageFrame::clicked, this, [=](){
chineseFrame->showSelectedIcon(false);
m_areaInterface->call("SetLanguage","en_US.UTF-8");
+ QString cmdtest = QString("bash /usr/bin/ukcc-setlang.sh %1").arg("en_US.UTF-8");
+ QProcess::execute (cmdtest);
showMessageBox(2);
});
}
@@ -341,11 +346,13 @@ QStringList Area::getUserDefaultLanguage() {
propertyMap = reply.value();
if (propertyMap.keys().contains("FormatsLocale")) {
formats = propertyMap.find("FormatsLocale").value().toString();
+ if(formats.isEmpty())
+ formats = QLocale::system().name()+ ".UTF-8";
}
if(language.isEmpty() && propertyMap.keys().contains("Language")) {
language = propertyMap.find("Language").value().toString();
if(language.isEmpty())
- language = QLocale::system().name()+ ".UTF-8";
+ language = QLocale::system().name()+ ".UTF-8";
}
} else {
qDebug() << "reply failed";
diff --git a/plugins/time-language/area/area.pro b/plugins/time-language/area/area.pro
index 1fb2fa0..a8df728 100644
--- a/plugins/time-language/area/area.pro
+++ b/plugins/time-language/area/area.pro
@@ -17,10 +17,13 @@ include(../../../shell/component/ImageUtil/imageutil.pri)
include(../../../shell/component/AddBtn/addbtn.pri)
include(../../../shell/component/Label/label.pri)
+setlang.files = $$PWD/ukcc-setlang.sh
+setlang.path = /usr/bin/
+
TARGET = $$qtLibraryTarget(area)
DESTDIR = ../..
target.path = $${PLUGIN_INSTALL_DIRS}
-INSTALLS += target
+INSTALLS += target setlang
LIBS += -L$$[QT_INSTALL_DIRS] -lgsettings-qt
diff --git a/plugins/time-language/area/ukcc-setlang.sh b/plugins/time-language/area/ukcc-setlang.sh
new file mode 100644
index 0000000..67413f7
--- /dev/null
+++ b/plugins/time-language/area/ukcc-setlang.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+language_name=$1
+
+touch ~/.bash_profile || exit 1
+
+grep -rin "LANG=" ~/.bash_profile
+
+result=$?
+
+if [ $result -eq 0 ];then
+ sed -i "s/LANG=.*/LANG=\"$language_name\"/g" ~/.bash_profile
+else
+ echo "LANG=\"$locale_name\"" >> ~/.bash_profile
+fi
--
2.33.0

View File

@ -0,0 +1,65 @@
From 48d56e7ed801ec81bb287190690e0f23decc8299 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Wed, 21 Jun 2023 17:34:27 +0800
Subject: [PATCH] cpuinfo in arm system is null
---
shell/utils/utils.cpp | 40 ++++++++++++++++------------------------
1 file changed, 16 insertions(+), 24 deletions(-)
diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp
index 1d61dac..7e418f5 100644
--- a/shell/utils/utils.cpp
+++ b/shell/utils/utils.cpp
@@ -57,32 +57,24 @@ QVariantMap Utils::getModuleHideStatus() {
}
QString Utils::getCpuInfo() {
- QFile file("/proc/cpuinfo");
-
- if (file.open(QIODevice::ReadOnly)) {
- QString buffer = file.readAll();
- QStringList modelLine = buffer.split('\n').filter(QRegularExpression("^model name"));
- QStringList modelLineWayland = buffer.split('\n').filter(QRegularExpression("^Hardware"));
- QStringList lines = buffer.split('\n');
-
- if (modelLine.isEmpty()) {
- if (modelLineWayland.isEmpty()) {
- return "Unknown";
- }
- modelLine = modelLineWayland;
+ QString result = "";
+ QProcess process;
+ process.start("lscpu");
+ process.waitForFinished();
+ QString output = process.readAll();
+ QStringList outputlist = output.split("\n");
+
+ for (QString str : outputlist) {
+ if (str.contains("型号名称")){
+ result = QString(str).right(str.length() - 28);
+ break;
+ }
+ else if(str.contains("Model name")) {
+ result = QString(str).right(str.length() - 33);
+ break;
}
-
-
- int count = lines.filter(QRegularExpression("^processor")).count();
-
- QString result;
- result.append(modelLine.first().split(':').at(1));
- result = result.trimmed();
-
- return result;
}
-
- return QString();
+ return result;
}
--
2.33.0

View File

@ -0,0 +1,12 @@
diff -u -r ukui-control-center-3.1.2/shell/mainwindow.cpp ukui-control-center-3.1.2/shell/mainwindow.cpp
--- ukui-control-center-3.1.2/shell/mainwindow.cpp 2023-04-03 13:52:30.000000000 +0800
+++ ukui-control-center-3.1.2/shell/mainwindow.cpp 2023-06-17 23:00:33.000000000 +0800
@@ -724,7 +724,7 @@
"QPushButton:pressed{background-color:%2;border-radius: 6px;}").arg(hoverColor).arg(clickColor));
}
- connect(qtSettings, &QGSettings::changed, this, [=,&hoverColor](const QString &key) {
+ connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) {
if (key == "styleName") {
iconBtn->reLoadIcon();
hoverColor = this->pluginBtnHoverColor(qtSettings->get("style-name").toString(), true);

View File

@ -0,0 +1,25 @@
From d5649623556085cb7f97cbc9e047c77514a554a5 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 29 Jan 2024 11:33:15 +0800
Subject: [PATCH] fix build error of ddcutil-2.0.0
---
registeredQDbus/sysdbusregister.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/registeredQDbus/sysdbusregister.cpp b/registeredQDbus/sysdbusregister.cpp
index 46766c3..ab63fb8 100644
--- a/registeredQDbus/sysdbusregister.cpp
+++ b/registeredQDbus/sysdbusregister.cpp
@@ -761,7 +761,7 @@ void SysdbusRegister::_getDisplayInfoThread()
display.edidHash = edidHash;
display.I2C_busType = QString::number(dlist_loc->info[i].path.path.i2c_busno);
ddca_create_edid_display_identifier(dlist_loc->info[i].edid_bytes,&did);
- ddca_create_display_ref(did,&ddca_dref);
+ ddca_get_display_ref(did,&ddca_dref);
ddca_open_display2(ddca_dref,false,&display.ddca_dh_loc);
displayInfo_V.append(display);
}
--
2.41.0

View File

@ -0,0 +1,51 @@
From 01afac8a63b6ab603d920a5296ffefbc6f5245ba Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 30 Jun 2023 16:36:43 +0800
Subject: [PATCH] fix changeusertype error
---
plugins/account/userinfo/changeusertype.cpp | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/plugins/account/userinfo/changeusertype.cpp b/plugins/account/userinfo/changeusertype.cpp
index 8ec8f6b..a36f2e7 100644
--- a/plugins/account/userinfo/changeusertype.cpp
+++ b/plugins/account/userinfo/changeusertype.cpp
@@ -25,17 +25,10 @@ ChangeUserType::ChangeUserType(QString objpath, QWidget *parent) :
setMinimumSize(QSize(520, 390));
setWindowTitle(tr("UserType"));
- if (Utils::isCommunity()) {
- cutiface = new QDBusInterface("com.control.center.qt.systemdbus",
- "/",
- "com.control.center.interface",
- QDBusConnection::systemBus());
- } else {
- cutiface = new QDBusInterface("org.freedesktop.Accounts",
- _objpath,
- "org.freedesktop.Accounts.User",
- QDBusConnection::systemBus());
- }
+ cutiface = new QDBusInterface("org.freedesktop.Accounts",
+ _objpath,
+ "org.freedesktop.Accounts.User",
+ QDBusConnection::systemBus());
initUI();
setConnect();
@@ -190,11 +183,7 @@ void ChangeUserType::setConnect(){
close();
});
connect(cutConfirmBtn, &QPushButton::clicked, this, [=]{
- if (Utils::isCommunity()) {
- cutiface->call("SetAccountType", _objpath, cutTypesBtnGroup->checkedId());
- } else {
- cutiface->call("SetAccountType", cutTypesBtnGroup->checkedId());
- }
+ cutiface->call("SetAccountType", cutTypesBtnGroup->checkedId());
accept();
});
--
2.33.0

View File

@ -0,0 +1,77 @@
From 67187a2ac22acad835b8e78a5007a77776c34742 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 10 May 2024 15:44:06 +0800
Subject: [PATCH] fix cpuinfo error of ukui-control-center-3.1.2
---
shell/utils/utils.cpp | 34 ++++++++++++++++++++++++++++++++++
shell/utils/utils.h | 1 +
2 files changed, 35 insertions(+)
diff --git a/shell/utils/utils.cpp b/shell/utils/utils.cpp
index 3c859a1..0680ab9 100644
--- a/shell/utils/utils.cpp
+++ b/shell/utils/utils.cpp
@@ -57,6 +57,39 @@ QVariantMap Utils::getModuleHideStatus() {
}
QString Utils::getCpuInfo() {
+ QFile file("/proc/cpuinfo");
+
+ if (file.open(QIODevice::ReadOnly)) {
+ QString buffer = file.readAll();
+ QStringList modelLine = buffer.split('\n').filter(QRegularExpression("^model name"));
+ QStringList modelLineWayland = buffer.split('\n').filter(QRegularExpression("^Hardware"));
+ QStringList lines = buffer.split('\n');
+
+ if (modelLine.isEmpty()) {
+ if (modelLineWayland.isEmpty()) {
+ QString lscpuresult = getlscpuinfo();
+ if (lscpuresult == "")
+ return "Unknown";
+ return lscpuresult;
+ }
+ modelLine = modelLineWayland;
+ }
+
+
+ int count = lines.filter(QRegularExpression("^processor")).count();
+
+ QString result;
+ result.append(modelLine.first().split(':').at(1));
+ result = result.trimmed();
+
+ return result;
+ }
+
+ return QString();
+}
+
+QString Utils::getlscpuinfo()
+{
QString result = "";
QProcess process;
process.start("lscpu");
@@ -74,6 +107,7 @@ QString Utils::getCpuInfo() {
break;
}
}
+ result = result.trimmed();
return result;
}
diff --git a/shell/utils/utils.h b/shell/utils/utils.h
index 71fb3bd..86e6150 100644
--- a/shell/utils/utils.h
+++ b/shell/utils/utils.h
@@ -40,6 +40,7 @@ namespace Utils
QRect sizeOnCursor();
QVariantMap getModuleHideStatus();
QString getCpuInfo();
+ QString getlscpuinfo();
QString getCpuArchitecture();
bool isExistEffect();
bool isExistBattery();
--
2.43.0

View File

@ -0,0 +1,26 @@
From 154ef4cd4ba90888c467d00a91337764628538ca Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Tue, 4 Jun 2024 09:13:48 +0800
Subject: [PATCH]
fix-the-display-resolution-does-not-match-the-actual-resolution.patch
---
plugins/system/display/outputconfig.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/system/display/outputconfig.cpp b/plugins/system/display/outputconfig.cpp
index a25f215..601215c 100644
--- a/plugins/system/display/outputconfig.cpp
+++ b/plugins/system/display/outputconfig.cpp
@@ -231,7 +231,7 @@ void OutputConfig::initConnection()
});
//监听,否则无法处理修改分辨率/刷新率未保存
connect(mOutput.data(), &KScreen::Output::currentModeIdChanged, this, [=]() {
- if (!mIsRestore || !mOutput->currentMode()) {
+ if (!mOutput->currentMode()) {
mIsRestore = true;
return;
}
--
2.43.0

View File

@ -0,0 +1,38 @@
From bb0c313ac7eb6a3f3d99e3ab86b41946feab53aa Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Thu, 21 Dec 2023 15:36:28 +0800
Subject: [PATCH]
ukui-control-center-3.1.2-repair-freelogin-autologin-not-available
---
plugins/account/userinfo/userinfo.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/plugins/account/userinfo/userinfo.cpp b/plugins/account/userinfo/userinfo.cpp
index 8288eb1..ebc21b9 100644
--- a/plugins/account/userinfo/userinfo.cpp
+++ b/plugins/account/userinfo/userinfo.cpp
@@ -823,7 +823,7 @@ void UserInfo::setUserConnect(){
QDBusConnection::systemBus());
qDebug() << "call" << "method: deleteuser";
- QDBusReply<int> ret = tmpSysinterface->call("setAutoLoginStatus", user.objpath, checked);
+ QDBusReply<int> ret = tmpSysinterface->call("setAutoLoginStatus", checked, user.username);
if (ret == 0) {
autoLoginSBtn->blockSignals(true);
@@ -852,8 +852,9 @@ void UserInfo::setUserConnect(){
return;
}
- QDBusReply<bool> ret = piface.call("setNoPwdLoginStatus", checked, user.username);
- if (ret == false) {
+ QDBusReply<int> ret = piface.call("setNoPwdLoginStatus", checked, user.username);
+
+ if (ret == 0) {
nopwdLoginSBtn->blockSignals(true);
nopwdLoginSBtn->setChecked(!checked);
nopwdLoginSBtn->blockSignals(false);
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: ukui-control-center
Version: 3.1.2
Release: 23
Release: 33
Summary: utilities to configure the UKUI desktop
License: GPL-2+
URL: http://www.ukui.org
@ -21,7 +21,20 @@ Patch16: fix-createuser-critical-vulnerabilities.patch
Patch17: ukui-control-center-3.1.2-fix-password-changes-for-this-user-and-for-other-use.patch
Patch18: fix-ukui-control-center-3.1.2-activation-button-display-error.patch
Patch19: disable-Time-to-sleep-of-kylin.patch
Patch20: fix-build-error-of-libkscreen-qt5-5.27.6.patch
Patch20: Turn-off-activation-button-hide-operation.patch
Patch21: add-information-for-about.patch
Patch22: cpuinfo-in-arm-system-is-null.patch
Patch23: add-ukcc-setlang.patch
Patch24: fix-changeusertype-error.patch
Patch25: update-formats_loacle-and-language.patch
Patch26: fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch
Patch27: ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch
Patch28: 0001-fix-object-created-in-wrong-thread.patch
Patch200: fix-build-error-of-libkscreen-qt5-5.27.6.patch
Patch201: fix-build-error-of-clang.patch
Patch202: fix-build-error-of-ddcutil-2.0.0.patch
Patch203: fix-the-display-resolution-does-not-match-the-actual-resolution.patch
BuildRequires: qt5-qtsvg-devel
BuildRequires: gsettings-qt-devel
BuildRequires: glib2-devel
@ -63,7 +76,7 @@ Requires: ukui-media
Requires: ukui-themes
#install need but control is not exist
Requires: libkylin-chkname1
Requires: lightdm
Suggests: gsettings-desktop-schemas
Suggests: mate-common
@ -97,7 +110,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}/etc/xdg/autostart/
%post
%posttrans
set -e
glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null ||:
@ -140,6 +153,63 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Aug 15 2024 huayadong <huayadong@kylinos.cn> - 3.1.2-33
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:Patch203:fix-the-display-resolution-does-not-match-the-actual-resolution.patch
* Tue Jun 25 2024 houhongxun <houhongxun@kylinos.cn> - 3.1.2-32
- fix wrong usage of qthread
* Tue May 28 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.2-31
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:add ukui-control-center-3.1.2-repair-freelogin-autologin-not-available.patch
* Fri May 10 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.2-30
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:add fix-cpuinfo-error-of-ukui-control-center-3.1.2.patch
* Mon Jan 29 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.2-29
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:add fix-build-error-of-ddcutil-2.0.0.patch
* Mon Sep 25 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-28
- Type:bugfix
- ID :NA
- SUG :NA
- DESC:add update-formats_loacle-and-language.patch
* Fri Sep 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-27
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add add-information-for-about.patch cpuinfo-in-arm-system-is-null.patch add-ukcc-setlang.patch fix-changeusertype-error.patch
* Fri Sep 08 2023 yoo <sunyuechi@iscas.ac.cn> - 3.1.2-26
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix clang build error
* Thu Sep 07 2023 douyan <douyan@kylinos.cn> - 3.1.2-25
- Type:Bugfix
- ID:NA
- SUG:NA
- DESC: add Turn-off-activation-button-hide-operation.patch
* Wed Aug 30 2023 huayadong <huayadong@kylinos.cn> - 3.1.2-24
- Type:bugfix
- ID:#I7WGWQ
- SUG:NA
- DESC:fix Abnormal information during installation and uninstallation
* Fri Aug 18 2023 douyan <douyan@kylinos.cn> - 3.1.2-23
- Type:bugfix
- ID:NA

View File

@ -0,0 +1,29 @@
diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp
index 5345b36..611bf9d 100644
--- a/plugins/time-language/area/area.cpp
+++ b/plugins/time-language/area/area.cpp
@@ -184,8 +185,7 @@ void Area::initLanguage()
HLineFrame *lineF_2 = new HLineFrame();
QStringList res = getUserDefaultLanguage();
- QString lang = res.at(1);
- int langIndex = lang.split(':').at(0) == "zh_CN.UTF-8" ? 0 : 1;
+ int langIndex= res.at(1).contains("zh_CN", Qt::CaseInsensitive) ? 0 : 1;
if (0 == langIndex) {
chineseFrame->showSelectedIcon(true);
@@ -222,9 +222,8 @@ void Area::initComponent() {
ui->countrycomboBox->addItem(tr("CN"));
QStringList res = getUserDefaultLanguage();
- QString lang = res.at(1);
- int langIndex = lang.split(':').at(0) == "zh_CN.UTF-8" ? 1 : 0;
- int formatIndex = res.at(0) == "zh_CN.UTF-8" ? 1 : 0;
+ int langIndex= res.at(1).contains("zh_CN", Qt::CaseInsensitive) ? 1 : 0;
+ int formatIndex= res.at(0).contains("zh_CN", Qt::CaseInsensitive) ? 1 : 0;
// ui->langcomboBox->setCurrentIndex(langIndex);
ui->countrycomboBox->setCurrentIndex(formatIndex);
--
2.41.0