Skip to content

Commit 0ceee4b

Browse files
authored
fix: Sixth round of bug fixes for private update & update transfer & HTTP speed limit online configuration features (#283)
Fixed the following issues: [V25 2500U1][Update Management System][Control Center Update Client][Seventh Round Testing][System Update][Public Network] Unchecking transfer optimization sub-items fails - actually unchecking succeeds (issue with failure indication) [V25 2500U1][Update Management System][Control Center Update Client][Seventh Round Testing][Control Center][System Update][Public Network] In Traditional Chinese environment, when entering invalid values in transfer optimization and download speed limit input fields, the prompt message appears in English [V25 2500U1][Update Management System][Enterprise Update Management System][Seventh Round Testing] After the terminal has performed an abnormal scheduled update, when the next non-forced update is issued, the Control Center still displays: "System will update at XXX" [V25 2500U1][Update Management System][Enterprise Update Management System][Seventh Round Testing] When the client receives a shutdown/restart update task and the download is completed, the Control Center should display text: "The system will update when the computer shuts down or restarts" [V25 2500U1][Update Management System][Enterprise Update Management System][First Round Testing] After the client successfully connects, the public network update plugin in the taskbar plugin area is not blocked [V25 2500U1][Update Management System][Enterprise Update Management System][Sixth Round Testing] When the server issues idle/busy time client speed limits and the client crosses two different speed limit intervals during download, the taskbar tray icon does not show the prompt "Download speed limit configuration switching in progress, download of update resources will continue after the switch is complete" Log: As above Bug: https://pms.uniontech.com/bug-view-358767.html https://pms.uniontech.com/bug-view-358703.html https://pms.uniontech.com/bug-view-358841.html https://pms.uniontech.com/bug-view-358833.html https://pms.uniontech.com/bug-view-354239.html https://pms.uniontech.com/bug-view-358183.html Influence: Affects private update & update transfer & HTTP speed limit online configuration features fix: 私有化更新&更新传递&http限速在线配置功能第六轮bug修复 修复以下问题: 【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第七轮测试】【系统更新】【公网】传递优化设置项子配置项去勾选失败,去勾选成功了 【V25 2500U1】【更新管理系统】【控制中心更新客户端】【第七轮测试】【控制中心】【系统更新】【公网】繁体中文环境,传递优化和下载限速输入框输入非法值,提示信息是英文 【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第七轮测试】终端进行过非正常定时更新,下一次下发非强制更新,控制中心还会显示:系统将于XXX进行更新 【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第七轮测试】客户端接收到关机重启更新任务,下载完成后,控制中心应该显示文案:系统将在计算机关机或重启时进行更新 【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第一轮测试】客户端接入成功之后,任务栏插件区域公网更新插件未屏蔽 【V25 2500U1】【更新管理系统】【企业级更新管理系统】【第六轮测试】服务端下发忙闲时客户端限速,客户端下载过程中跨两个不同限速区间,任务栏托盘图标没有提示“”“下载限速配置切换中,切换完成后将会继续下载更新资源 Log:如上所述 Bug:https://pms.uniontech.com/bug-view-358767.html https://pms.uniontech.com/bug-view-358703.html https://pms.uniontech.com/bug-view-358841.html https://pms.uniontech.com/bug-view-358833.html https://pms.uniontech.com/bug-view-354239.html https://pms.uniontech.com/bug-view-358183.html Influence:影响私有化更新&更新传递&http限速在线配置功能
1 parent b97071a commit 0ceee4b

14 files changed

Lines changed: 217 additions & 32 deletions

File tree

src/common/dbus/updatedbusproxy.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ QString UpdateDBusProxy::updateStatus()
207207
return qvariant_cast<QString>(m_managerInter->property("UpdateStatus"));
208208
}
209209

210+
bool UpdateDBusProxy::downloadLimitOnChanging()
211+
{
212+
return qvariant_cast<bool>(m_managerInter->property("downloadLimitOnChanging"));
213+
}
214+
210215
bool UpdateDBusProxy::p2PUpdateEnable()
211216
{
212217
return qvariant_cast<bool>(m_updateInter->property("P2PUpdateEnable"));

src/common/dbus/updatedbusproxy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ class UpdateDBusProxy : public QObject
6767
Q_PROPERTY(QString updateStatus READ updateStatus NOTIFY UpdateStatusChanged)
6868
QString updateStatus();
6969

70+
Q_PROPERTY(bool downloadLimitOnChanging READ downloadLimitOnChanging NOTIFY DownloadLimitOnChangingChanged)
71+
bool downloadLimitOnChanging();
72+
7073
Q_PROPERTY(bool ImmutableAutoRecovery READ immutableAutoRecovery NOTIFY ImmutableAutoRecoveryChanged)
7174
bool immutableAutoRecovery();
7275

@@ -156,6 +159,7 @@ class UpdateDBusProxy : public QObject
156159
void AutoCleanChanged(bool value) const;
157160
void UpdateModeChanged(qulonglong value) const;
158161
void UpdateStatusChanged(QString value) const;
162+
void DownloadLimitOnChangingChanged(bool value) const;
159163
void ImmutableAutoRecoveryChanged(bool value) const;
160164
void P2PUpdateEnableChanged(bool value) const;
161165
void P2PUpdateSupportChanged(bool value) const;

src/dcc-update-plugin/operation/updatemodel.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ UpdateModel::UpdateModel(QObject* parent)
6767
, m_downloadWaiting(false)
6868
, m_downloadPaused(false)
6969
, m_upgradeWaiting(false)
70-
, m_scheduledUpgradeTime("")
70+
, m_forceUpdateText("")
7171
, m_downloadProgress(0.0)
7272
, m_distUpgradeProgress(0.0)
7373
, m_backupProgress(0.0)
@@ -221,22 +221,25 @@ void UpdateModel::setBatterIsOK(bool ok)
221221
Q_EMIT batterIsOKChanged(ok);
222222
}
223223

224-
void UpdateModel::setScheduledUpgradeTime()
224+
void UpdateModel::setForceUpdateText(const QString& updateTime, int lastoreStatus)
225225
{
226-
QString updateTime = DConfigHelper::instance()->getConfig("org.deepin.dde.lastore", "org.deepin.dde.lastore", "","update-time", "").toString();
227226
if (!updateTime.isEmpty()) {
228227
QDateTime dateTime = QDateTime::fromString(updateTime, Qt::ISODate);
229228
if (dateTime.isValid()) {
230229
QString formattedDateTime = dateTime.toString("HH:mm:ss");
231230
qCDebug(logDccUpdatePlugin) << "Set scheduled upgrade time:" << formattedDateTime;
232-
if (m_scheduledUpgradeTime == formattedDateTime) {
231+
if (m_forceUpdateText == formattedDateTime) {
233232
return;
234233
}
235234

236-
m_scheduledUpgradeTime = formattedDateTime;
237-
Q_EMIT scheduledUpgradeTimeChanged();
235+
m_forceUpdateText = tr("will upgrade at %1").arg(formattedDateTime);
238236
}
237+
} else if (lastoreStatus == ShutdownUpdateStatus) {
238+
m_forceUpdateText = tr("will upgrade when shutdown");
239+
} else {
240+
m_forceUpdateText = "";
239241
}
242+
Q_EMIT forceUpdateTextChanged();
240243
}
241244

242245
void UpdateModel::setLastStatus(const UpdatesStatus& status, int line, int types)

src/dcc-update-plugin/operation/updatemodel.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class UpdateModel : public QObject
5555
Q_PROPERTY(bool downloadWaiting READ downloadWaiting NOTIFY downloadWaitingChanged FINAL)
5656
Q_PROPERTY(bool downloadPaused READ downloadPaused NOTIFY downloadPausedChanged FINAL)
5757
Q_PROPERTY(bool upgradeWaiting READ upgradeWaiting NOTIFY upgradeWaitingChanged FINAL)
58-
Q_PROPERTY(QString scheduledUpgradeTime READ scheduledUpgradeTime NOTIFY scheduledUpgradeTimeChanged FINAL)
58+
Q_PROPERTY(QString forceUpdateText READ forceUpdateText NOTIFY forceUpdateTextChanged FINAL)
5959

6060
Q_PROPERTY(double downloadProgress READ downloadProgress NOTIFY downloadProgressChanged FINAL)
6161
Q_PROPERTY(double backupProgress READ backupProgress NOTIFY backupProgressChanged FINAL)
@@ -200,8 +200,8 @@ class UpdateModel : public QObject
200200
bool upgradeWaiting() const { return m_upgradeWaiting; }
201201
void setUpgradeWaiting(bool waiting);
202202

203-
QString scheduledUpgradeTime() const { return m_scheduledUpgradeTime; }
204-
void setScheduledUpgradeTime();
203+
QString forceUpdateText() const { return m_forceUpdateText; }
204+
void setForceUpdateText(const QString& updateTime, int lastoreStatus);
205205

206206
double downloadProgress() const { return m_downloadProgress; }
207207
void setDownloadProgress(double downloadProgress);
@@ -401,7 +401,7 @@ public slots:
401401
void downloadWaitingChanged(bool waiting);
402402
void downloadPausedChanged(bool paused);
403403
void upgradeWaitingChanged(bool waiting);
404-
void scheduledUpgradeTimeChanged();
404+
void forceUpdateTextChanged();
405405

406406
void downloadProgressChanged(const double &progress);
407407
void backupProgressChanged(double progress);
@@ -481,7 +481,7 @@ public slots:
481481
bool m_downloadWaiting;
482482
bool m_downloadPaused;
483483
bool m_upgradeWaiting;
484-
QString m_scheduledUpgradeTime;
484+
QString m_forceUpdateText;
485485
double m_downloadProgress;
486486
double m_distUpgradeProgress;
487487
double m_backupProgress;

src/dcc-update-plugin/operation/updatework.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void UpdateWorker::initConfig()
299299
qCDebug(logDccUpdatePlugin) << "Initialize lastore daemon configuration";
300300
if (m_lastoreDConfig && m_lastoreDConfig->isValid()) {
301301
m_model->setLastoreDaemonStatus(m_lastoreDConfig->value("lastore-daemon-status").toInt());
302-
m_model->setScheduledUpgradeTime();
302+
m_model->setForceUpdateText(m_lastoreDConfig->value("update-time").toString(), m_lastoreDConfig->value("lastore-daemon-status").toInt());
303303
connect(m_lastoreDConfig, &DConfig::valueChanged, this, [this](const QString& key) {
304304
if ("lastore-daemon-status" == key) {
305305
bool ok;
@@ -310,8 +310,8 @@ void UpdateWorker::initConfig()
310310
}
311311
m_model->setForceUpdate();
312312
}
313-
if ("update-time" == key) {
314-
m_model->setScheduledUpgradeTime();
313+
if ("update-time" == key || "lastore-daemon-status" == key) {
314+
m_model->setForceUpdateText(m_lastoreDConfig->value("update-time").toString(), m_lastoreDConfig->value("lastore-daemon-status").toInt());
315315
m_model->setForceUpdate();
316316
}
317317
});
@@ -1785,7 +1785,7 @@ void UpdateWorker::setUpgradeDeliveryDownloadLimitSpeed(const QString& speed, bo
17851785
watcher->deleteLater();
17861786
if (watcher->isError()) {
17871787
qCWarning(logDccUpdatePlugin) << "Set upgrade download speed limit config error: " << watcher->error().message();
1788-
getUpgradeDeliveryDownloadLimitSpeed();
1788+
m_model->setUpgradeDownloadSpeedLimitConfig(m_model->upgradeDownloadSpeedLimitConfig().toJson().toUtf8());
17891789
Q_EMIT upgradeDeliveryConfigSetFailed();
17901790
return;
17911791
}
@@ -1805,7 +1805,7 @@ void UpdateWorker::setUpgradeDeliveryUploadLimitSpeed(const QString& speed, bool
18051805
watcher->deleteLater();
18061806
if (watcher->isError()) {
18071807
qCWarning(logDccUpdatePlugin) << "Set upgrade upload speed limit config error: " << watcher->error().message();
1808-
getUpgradeDeliveryUploadLimitSpeed();
1808+
m_model->setUpgradeUploadSpeedLimitConfig(m_model->upgradeUploadSpeedLimitConfig().toJson().toUtf8());
18091809
Q_EMIT upgradeDeliveryConfigSetFailed();
18101810
return;
18111811
}

src/dcc-update-plugin/qml/UpdateMain.qml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,7 @@ DccObject {
297297
qsTr("Check Again")
298298
] : [qsTr("Install updates")]
299299
function updateSecondaryTips() {
300-
secondaryUpdateTips = dccData.model().scheduledUpgradeTime.length !== 0
301-
? qsTr("will upgrade at %1").arg(dccData.model().scheduledUpgradeTime)
302-
: ""
300+
secondaryUpdateTips = dccData.model().forceUpdateText
303301
}
304302
updateTips: {
305303
if (!dccData.model().batterIsOK) {
@@ -346,7 +344,7 @@ DccObject {
346344

347345
Connections {
348346
target: dccData.model()
349-
function onScheduledUpgradeTimeChanged() {
347+
function onForceUpdateTextChanged() {
350348
preInstallUpdateControl.updateSecondaryTips()
351349
}
352350
}

src/dcc-update-plugin/translations/update_zh_CN.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@
205205
<source>Update size: </source>
206206
<translation>更新大小:</translation>
207207
</message>
208-
<message>
209-
<source>will upgrade at %1</source>
210-
<translation>将于%1开始系统更新</translation>
211-
</message>
212208
<message>
213209
<source>Downloading</source>
214210
<translation>下载中</translation>
@@ -376,6 +372,14 @@
376372
<source>Turn on the switches under Update Content to get better experiences</source>
377373
<translation>开启更新内容开关,可以获得更优质的功能体验哦</translation>
378374
</message>
375+
<message>
376+
<source>will upgrade when shutdown</source>
377+
<translation>系统将在计算机关机或重启时进行更新</translation>
378+
</message>
379+
<message>
380+
<source>will upgrade at %1</source>
381+
<translation>将于%1开始系统更新</translation>
382+
</message>
379383
<message>
380384
<source>Your system is not activated, and it failed to connect to update services</source>
381385
<translation>当前系统未激活,无法启动更新服务</translation>

src/dcc-update-plugin/translations/update_zh_HK.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@
205205
<source>Update size: </source>
206206
<translation>更新大小:</translation>
207207
</message>
208-
<message>
209-
<source>will upgrade at %1</source>
210-
<translation>將於%1開始系統更新</translation>
211-
</message>
212208
<message>
213209
<source>Downloading</source>
214210
<translation>下載中</translation>
@@ -376,6 +372,14 @@
376372
<source>Turn on the switches under Update Content to get better experiences</source>
377373
<translation>開啓更新內容開關,可以獲得更優質的功能體驗哦</translation>
378374
</message>
375+
<message>
376+
<source>will upgrade when shutdown</source>
377+
<translation>系統將在計算機關機或重啓時進行更新</translation>
378+
</message>
379+
<message>
380+
<source>will upgrade at %1</source>
381+
<translation>將於%1開始系統更新</translation>
382+
</message>
379383
<message>
380384
<source>Your system is not activated, and it failed to connect to update services</source>
381385
<translation>當前系統未激活,無法啓動更新服務</translation>
@@ -526,6 +530,10 @@
526530
<source>Only numbers between 1-99999 are allowed</source>
527531
<translation>只允許輸入1-99999</translation>
528532
</message>
533+
<message>
534+
<source>Only numbers between 10-999999 are allowed</source>
535+
<translation>只允許輸入10-999999</translation>
536+
</message>
529537
<message>
530538
<source>Failed to change Delivery Optimization setting</source>
531539
<translation>更新傳遞優化服務異常</translation>

src/dcc-update-plugin/translations/update_zh_TW.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@
205205
<source>Update size: </source>
206206
<translation>更新大小:</translation>
207207
</message>
208-
<message>
209-
<source>will upgrade at %1</source>
210-
<translation>將於%1開始系統更新</translation>
211-
</message>
212208
<message>
213209
<source>Downloading</source>
214210
<translation>下載中</translation>
@@ -376,6 +372,14 @@
376372
<source>Turn on the switches under Update Content to get better experiences</source>
377373
<translation>開啟更新內容開關,可以獲得更優質的功能體驗哦</translation>
378374
</message>
375+
<message>
376+
<source>will upgrade when shutdown</source>
377+
<translation>系統將在計算機關機或重啟時進行更新</translation>
378+
</message>
379+
<message>
380+
<source>will upgrade at %1</source>
381+
<translation>將於%1開始系統更新</translation>
382+
</message>
379383
<message>
380384
<source>Your system is not activated, and it failed to connect to update services</source>
381385
<translation>當前系統未啟用,無法啟動更新服務</translation>
@@ -526,6 +530,10 @@
526530
<source>Only numbers between 1-99999 are allowed</source>
527531
<translation>只允許輸入1-99999</translation>
528532
</message>
533+
<message>
534+
<source>Only numbers between 10-999999 are allowed</source>
535+
<translation>只允許輸入10-999999</translation>
536+
</message>
529537
<message>
530538
<source>Failed to change Delivery Optimization setting</source>
531539
<translation>更新傳遞優化服務異常</translation>

src/dock-update-plugin/pluginupdateplugin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ void PluginUpdatePlugin::init(PluginProxyInterface *proxyInter)
105105

106106
m_updateMode = m_dconfig->value("update-mode").toInt();
107107
m_updateStatus = m_dconfig->value("update-status");
108+
m_isPrivateUpdate = m_dconfig->value("intranet-update", false).toBool();
108109

109110
connect(m_dconfig.data(), &DConfig::valueChanged, this, &PluginUpdatePlugin::onConfigChanged);
110111

0 commit comments

Comments
 (0)