From 5a8bd47296e204a68014a60757758c50fa623526 Mon Sep 17 00:00:00 2001 From: Amol Godbole Date: Thu, 9 Nov 2023 11:17:33 -0600 Subject: DolphinView: Use SingleShot and Queued Connections A minor refactor where Qt::SingleShotConnection has been utilized. Also, signal delay using QTimer has been replaced with a Qt::QueuedConnection. --- src/kitemviews/kfileitemmodel.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/kitemviews/kfileitemmodel.cpp') diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 5f4f0bb9a..939f66157 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1196,12 +1196,7 @@ void KFileItemModel::slotItemsDeleted(const KFileItemList &items) for (const KFileItem &item : items) { if (item.url() == currentDir) { - // #473377: Delay emitting currentDirectoryRemoved() to avoid modifying KCoreDirLister - // before KCoreDirListerCache::deleteDir() returns. - QTimer::singleShot(0, this, [this] { - Q_EMIT currentDirectoryRemoved(); - }); - + Q_EMIT currentDirectoryRemoved(); return; } -- cgit v1.3