forked from qt-creator/qt-creator
Core: remove suspended entry from file path cache
... when cleaning up suspended documents on session switch. Fixes: QTCREATORBUG-28021 Change-Id: I6ef9fda96162d56758f176381b1eabe47eb8770f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -485,10 +485,15 @@ void DocumentModelPrivate::removeAllSuspendedEntries(PinnedFileRemovalPolicy pin
|
|||||||
if (pinnedFileRemovalPolicy == DoNotRemovePinnedFiles && entry->pinned)
|
if (pinnedFileRemovalPolicy == DoNotRemovePinnedFiles && entry->pinned)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const FilePath fixedPath = DocumentManager::filePathKey(entry->fileName(),
|
||||||
|
DocumentManager::ResolveLinks);
|
||||||
int row = i + 1/*<no document>*/;
|
int row = i + 1/*<no document>*/;
|
||||||
d->beginRemoveRows(QModelIndex(), row, row);
|
d->beginRemoveRows(QModelIndex(), row, row);
|
||||||
delete d->m_entries.takeAt(i);
|
delete d->m_entries.takeAt(i);
|
||||||
d->endRemoveRows();
|
d->endRemoveRows();
|
||||||
|
|
||||||
|
if (!fixedPath.isEmpty())
|
||||||
|
d->m_entryByFixedPath.remove(fixedPath);
|
||||||
}
|
}
|
||||||
QSet<QString> displayNames;
|
QSet<QString> displayNames;
|
||||||
for (DocumentModel::Entry *entry : qAsConst(d->m_entries)) {
|
for (DocumentModel::Entry *entry : qAsConst(d->m_entries)) {
|
||||||
|
Reference in New Issue
Block a user