Changeset View
Changeset View
Standalone View
Standalone View
src/core/deletejob.cpp
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Line(s) | 243 | while (m_currentStat != m_srcList.end() && (*m_currentStat).isLocalFile()) { | |||
---|---|---|---|---|---|
246 | currentSourceStated(fileInfo.isDir(), fileInfo.isSymLink()); | 246 | currentSourceStated(fileInfo.isDir(), fileInfo.isSymLink()); | ||
247 | ++m_currentStat; | 247 | ++m_currentStat; | ||
248 | } | 248 | } | ||
249 | } | 249 | } | ||
250 | if (m_currentStat == m_srcList.end()) { | 250 | if (m_currentStat == m_srcList.end()) { | ||
251 | // Done, jump to the last else of this method | 251 | // Done, jump to the last else of this method | ||
252 | statNextSrc(); | 252 | statNextSrc(); | ||
253 | } else { | 253 | } else { | ||
254 | KIO::SimpleJob *job = KIO::stat(m_currentURL, StatJob::SourceSide, 0, KIO::HideProgressInfo); | 254 | KIO::SimpleJob *job = KIO::stat(m_currentURL, StatJob::SourceSide, KIO::StatJob::Basic, KIO::HideProgressInfo); | ||
255 | Scheduler::setJobPriority(job, 1); | 255 | Scheduler::setJobPriority(job, 1); | ||
256 | //qDebug() << "stat'ing" << m_currentURL; | 256 | //qDebug() << "stat'ing" << m_currentURL; | ||
257 | q->addSubjob(job); | 257 | q->addSubjob(job); | ||
258 | } | 258 | } | ||
259 | } else { | 259 | } else { | ||
260 | if (!q->hasSubjobs()) { // don't go there yet if we're still listing some subdirs | 260 | if (!q->hasSubjobs()) { // don't go there yet if we're still listing some subdirs | ||
261 | finishedStatPhase(); | 261 | finishedStatPhase(); | ||
262 | } | 262 | } | ||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Line(s) | 392 | if (url.isLocalFile()) { | |||
393 | // We are about to delete this dir, no need to watch it | 393 | // We are about to delete this dir, no need to watch it | ||
394 | // Maybe we should ask kdirwatch to remove all watches recursively? | 394 | // Maybe we should ask kdirwatch to remove all watches recursively? | ||
395 | // But then there would be no feedback (things disappearing progressively) during huge deletions | 395 | // But then there would be no feedback (things disappearing progressively) during huge deletions | ||
396 | KDirWatch::self()->stopDirScan(url.adjusted(QUrl::StripTrailingSlash).toLocalFile()); | 396 | KDirWatch::self()->stopDirScan(url.adjusted(QUrl::StripTrailingSlash).toLocalFile()); | ||
397 | } | 397 | } | ||
398 | if (!KProtocolManager::canDeleteRecursive(url)) { | 398 | if (!KProtocolManager::canDeleteRecursive(url)) { | ||
399 | //qDebug() << url << "is a directory, let's list it"; | 399 | //qDebug() << url << "is a directory, let's list it"; | ||
400 | ListJob *newjob = KIO::listRecursive(url, KIO::HideProgressInfo); | 400 | ListJob *newjob = KIO::listRecursive(url, KIO::HideProgressInfo); | ||
401 | newjob->addMetaData(QStringLiteral("details"), QStringLiteral("0")); | 401 | newjob->addMetaData(QStringLiteral("details"), QString::number(KIO::StatJob::Basic)); | ||
402 | newjob->setUnrestricted(true); // No KIOSK restrictions | 402 | newjob->setUnrestricted(true); // No KIOSK restrictions | ||
403 | Scheduler::setJobPriority(newjob, 1); | 403 | Scheduler::setJobPriority(newjob, 1); | ||
404 | QObject::connect(newjob, SIGNAL(entries(KIO::Job*,KIO::UDSEntryList)), | 404 | QObject::connect(newjob, SIGNAL(entries(KIO::Job*,KIO::UDSEntryList)), | ||
405 | q, SLOT(slotEntries(KIO::Job*,KIO::UDSEntryList))); | 405 | q, SLOT(slotEntries(KIO::Job*,KIO::UDSEntryList))); | ||
406 | q->addSubjob(newjob); | 406 | q->addSubjob(newjob); | ||
407 | // Note that this listing job will happen in parallel with other stat jobs. | 407 | // Note that this listing job will happen in parallel with other stat jobs. | ||
408 | } | 408 | } | ||
409 | } else { | 409 | } else { | ||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |