Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Super committed Oct 13, 2024
1 parent 75fc32b commit f58ed05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DownloadListWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ void DownloadListWidget::addDownloadingItem(DownloadItemWidget* item)
return;
}

// FIXME: 下载中列表空白行占位。takeItem和removeItemWidget移除widget,会导致widget析构
QListWidgetItem* newItem = new QListWidgetItem(ui->completedListWidget);
ui->completedListWidget->addItem(newItem);

ui->completedListWidget->setItemWidget(newItem, downloadWidget);
});
connect(item, &DownloadItemWidget::removeItemSignal, this, [this, widgetItem]() {
// FIXME: 移除后,有空白行占位
auto w = ui->downloadingListWidget->itemWidget(widgetItem);
if (w != nullptr) {
ui->downloadingListWidget->removeItemWidget(widgetItem);
Expand Down

0 comments on commit f58ed05

Please sign in to comment.