┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
diff options
context:
space:
mode:
authorAmol Godbole <[email protected]>2023-11-09 11:17:33 -0600
committerMéven Car <[email protected]>2024-01-14 08:34:58 +0000
commit5a8bd47296e204a68014a60757758c50fa623526 (patch)
treeb595e21caf4c0c51ae2e86f659c3514e89ef4293 /src/kitemviews/kfileitemmodel.cpp
parentc035e95e1d74fecd8267b08009c616232e2c16b0 (diff)
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.
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp7
1 files changed, 1 insertions, 6 deletions
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;
}