Skip to content

Commit

Permalink
fix: Remove clear focus code
Browse files Browse the repository at this point in the history
移除清除焦点的代码

Log: 移除清除焦点的代码
Bug: https://pms.uniontech.com/bug-view-247435.html
Influence: FocusWidget
  • Loading branch information
rb-union committed Mar 22, 2024
1 parent 359c6d4 commit c4ba2e8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
4 changes: 0 additions & 4 deletions src/deb-installer/view/pages/debinstaller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,6 @@ void DebInstaller::slotReset()

this->setAcceptDrops(true);
m_fileChooseWidget->setAcceptDrops(true);
// 安装完成后,清除文件选择按钮的焦点
m_fileChooseWidget->clearChooseFileBtnFocus();
m_wineAuthStatus = DebListModel::AuthBefore;
}

Expand Down Expand Up @@ -824,8 +822,6 @@ void DebInstaller::single2Multi()

void DebInstaller::refreshSingle()
{
m_fileChooseWidget->clearChooseFileBtnFocus();

// 刷新文件的状态,初始化包的状态为准备状态
m_fileListModel->resetFileStatus();
m_fileListModel->initPrepareStatus();
Expand Down
6 changes: 0 additions & 6 deletions src/deb-installer/view/widgets/filechoosewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,3 @@ void FileChooseWidget::themeChanged()
QIcon icon_split_line = QIcon::fromTheme("di_split_line");
split_line->setPixmap(icon_split_line.pixmap(QSize(220, 3)));
}

void FileChooseWidget::clearChooseFileBtnFocus()
{
m_chooseFileBtn->clearFocus(); //清除文件选择按钮的焦点
}

5 changes: 0 additions & 5 deletions src/deb-installer/view/widgets/filechoosewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ class FileChooseWidget : public QWidget
public:
explicit FileChooseWidget(QWidget *parent = nullptr);

/**
* @brief clearChooseFileBtnFocus 清除文件选择按钮的焦点。
*/
void clearChooseFileBtnFocus();

signals:
/**
* @brief packagesSelected 选择文件信号
Expand Down
8 changes: 0 additions & 8 deletions tests/src/view/widgets/ut_filechoosewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,3 @@ TEST(FileChooseWidget_TEST, FileChooseWidget_UT_chooseFiles)
ASSERT_EQ("/", fchooseWidget->m_settings.value("history_dir"));
delete fchooseWidget;
}

TEST(FileChooseWidget_TEST, FileChooseWidget_UT_clearChooseFileBtnFocus)
{
FileChooseWidget *fchooseWidget = new FileChooseWidget;
fchooseWidget->clearChooseFileBtnFocus();
ASSERT_FALSE(fchooseWidget->hasFocus());
delete fchooseWidget;
}

0 comments on commit c4ba2e8

Please sign in to comment.