From f58ed05bd90084af3ac8f81f36ace932c771179c Mon Sep 17 00:00:00 2001 From: L-Super <120311070@qq.com> Date: Sun, 13 Oct 2024 12:17:34 +0800 Subject: [PATCH] chore: add comment --- src/DownloadListWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DownloadListWidget.cpp b/src/DownloadListWidget.cpp index 8918f4d..963c4bf 100644 --- a/src/DownloadListWidget.cpp +++ b/src/DownloadListWidget.cpp @@ -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);