fix: after screen-recorder finished, dock will coredump

When screen-recorder finish recording, will notify dock update item, and dock
will clean all item and readded back. But m_dragInfo->dockItem still point to
old item which has been cleaned.
So dock will coredump, while using this pointer to judge item can drag or not.

log: update m_dragInfo->dockItem pointer when dock itemCountChanged.
This commit is contained in:
tsic404 2023-04-26 16:17:19 +08:00 committed by deepin-bot[bot]
parent 9bfcf4580e
commit 50bbc3cf01

View File

@ -382,8 +382,10 @@ void QuickPluginWindow::onRequestUpdate()
m_mainLayout->addWidget(itemWidget);
}
if (countChanged)
if (countChanged) {
m_dragInfo->dockItem = nullptr;
Q_EMIT itemCountChanged();
}
}
QPoint QuickPluginWindow::popupPoint(QWidget *widget) const