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 40c76c7ef..f42f2c193 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1197,7 +1197,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; } |
