diff options
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index a175e0bfe..77d5a319c 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1196,7 +1196,12 @@ void KFileItemModel::slotItemsDeleted(const KFileItemList &items) for (const KFileItem &item : items) { if (item.url() == currentDir) { - Q_EMIT currentDirectoryRemoved(); + // #473377: Delay emitting currentDirectoryRemoved() to avoid modifying KCoreDirLister + // before KCoreDirListerCache::deleteDir() returns. + QTimer::singleShot(0, this, [this] { + Q_EMIT currentDirectoryRemoved(); + }); + return; } |
