Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 一键安装时安装失败后无法重新全选 #261

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deepin-devicemanager/src/Page/PageDriverInstallInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ void PageDriverInstallInfo::setCheckedCBDisnable()
mp_ViewCanUpdate->setCheckedCBDisnable();
}

void PageDriverInstallInfo::setHeaderCbEnable(bool enable)
{
mp_ViewNotInstall->setHeaderCbEnable(enable);
mp_ViewCanUpdate->setHeaderCbEnable(enable);
}
void PageDriverInstallInfo::slotDownloadProgressChanged(DriverType type, QString size, QStringList msg)
{
// 将下载过程时时更新到表格上方的状态里面 qInfo() << "Download ********** " << msg[0] << " , " << msg[1] << " , " << msg[2];
Expand Down
5 changes: 5 additions & 0 deletions deepin-devicemanager/src/Page/PageDriverInstallInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class PageDriverInstallInfo : public DFrame
*/
void setCheckedCBDisnable();

/**
* @brief setHeaderCbEnable 设置表头checkbox状态
*/
void setHeaderCbEnable(bool enable);

public slots:
/**
* @brief slotDownloadProgressChanged 下载进度刷新
Expand Down
8 changes: 7 additions & 1 deletion deepin-devicemanager/src/Page/PageDriverManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ void PageDriverManager::slotInstallProgressFinished(bool bsuccess, int err)
// 成功
if (bsuccess) {
successNum += 1;
m_ListUpdateIndex.removeAt(m_ListUpdateIndex.indexOf(m_CurIndex));
} else { // 失败
// 通知网络错误
if (err == EC_NOTIFY_NETWORK) {
Expand Down Expand Up @@ -358,6 +359,11 @@ void PageDriverManager::slotInstallProgressFinished(bool bsuccess, int err)
mp_DriverInstallInfoPage->headWidget()->setInstallFailedUI();
}

if (m_ListUpdateIndex.isEmpty()) {
mp_DriverInstallInfoPage->setHeaderCbEnable(false);
} else {
mp_DriverInstallInfoPage->setHeaderCbEnable(true);
}
mp_DriverInstallInfoPage->headWidget()->setReDetectEnable(true);
mp_DriverBackupInfoPage->headWidget()->setReDetectEnable(true);
mp_DriverRestoreInfoPage->headWidget()->setReDetectEnable(true);
Expand Down Expand Up @@ -389,7 +395,7 @@ void PageDriverManager::slotBackupAllDrivers()

void PageDriverManager::slotScanFinished(ScanResult sr)
{
// testDevices();
// testDevices();

if (SR_SUCESS == sr) {
foreach (DriverInfo *info, m_ListDriverInfo) {
Expand Down
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/Page/PageDriverRestoreInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ void PageDriverRestoreInfo::initUI()
mp_GotoBackupSgButton->setText(tr("Go to Backup Driver"));
mp_GotoBackupSgButton->setFixedWidth(310);
mp_GotoBackupSgButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
mp_GotoBackupSgButton->setFocusPolicy(Qt::NoFocus);

noRestoreMainLayout->addStretch();
noRestoreMainLayout->addWidget(picLabel);
Expand Down Expand Up @@ -170,7 +171,6 @@ void PageDriverRestoreInfo::showTables(int backedLength)
mp_StackWidget->setCurrentIndex(0);
} else {
mp_StackWidget->setCurrentIndex(1);

}
}

Expand Down