diff --git a/src/core/copyjob.cpp b/src/core/copyjob.cpp --- a/src/core/copyjob.cpp +++ b/src/core/copyjob.cpp @@ -894,7 +894,7 @@ if (m_currentSrcURL.isLocalFile()) { const QString parentDir = m_currentSrcURL.adjusted(QUrl::RemoveFilename).path(); if (!m_parentDirs.contains(parentDir)) { - KDirWatch::self()->stopDirScan(parentDir); + KDirWatch::self()->removeDir(parentDir); m_parentDirs.insert(parentDir); } } @@ -1242,7 +1242,7 @@ // on those dirs temporarily (using KDirWatch::self, that's the instanced // used by e.g. kdirlister). for (QSet::const_iterator it = m_parentDirs.constBegin(); it != m_parentDirs.constEnd(); ++it) { - KDirWatch::self()->stopDirScan(*it); + KDirWatch::self()->removeDir(*it); } } @@ -1765,7 +1765,7 @@ // Re-enable watching on the dirs that held the deleted/moved files if (d->m_mode == CopyJob::Move) { for (QSet::const_iterator it = d->m_parentDirs.constBegin(); it != d->m_parentDirs.constEnd(); ++it) { - KDirWatch::self()->restartDirScan(*it); + KDirWatch::self()->addDir(*it); } } Job::emitResult(); diff --git a/src/core/deletejob.cpp b/src/core/deletejob.cpp --- a/src/core/deletejob.cpp +++ b/src/core/deletejob.cpp @@ -268,7 +268,7 @@ // used by e.g. kdirlister). const QSet::const_iterator itEnd = m_parentDirs.constEnd(); for (QSet::const_iterator it = m_parentDirs.constBegin(); it != itEnd; ++it) { - KDirWatch::self()->stopDirScan(*it); + KDirWatch::self()->removeDir(*it); } state = DELETEJOB_STATE_DELETING_FILES; deleteNextFile(); @@ -371,7 +371,7 @@ { const auto itEnd = m_parentDirs.constEnd(); for (auto it = m_parentDirs.constBegin(); it != itEnd; ++it) { - KDirWatch::self()->restartDirScan(*it); + KDirWatch::self()->addDir(*it); } } @@ -386,7 +386,7 @@ // We are about to delete this dir, no need to watch it // Maybe we should ask kdirwatch to remove all watches recursively? // But then there would be no feedback (things disappearing progressively) during huge deletions - KDirWatch::self()->stopDirScan(url.adjusted(QUrl::StripTrailingSlash).toLocalFile()); + KDirWatch::self()->removeDir(url.adjusted(QUrl::StripTrailingSlash).toLocalFile()); } if (!KProtocolManager::canDeleteRecursive(url)) { //qDebug() << url << "is a directory, let's list it";