| 261 | } |
| 262 | |
| 263 | bool DefaultFileAccessJobHandler::removeFile(const QUrl& fileName) |
| 264 | { |
| 265 | if(fileName.isEmpty()) |
| 266 | return false; |
| 267 | else |
| 268 | { |
| 269 | m_bSuccess = false; |
| 270 | #if HAS_KFKIO |
| 271 | KIO::SimpleJob* pJob = KIO::file_delete(fileName, KIO::HideProgressInfo); |
| 272 | chk_connect(pJob, &KIO::SimpleJob::result, this, &DefaultFileAccessJobHandler::slotSimpleJobResult); |
| 273 | chk_connect(pJob, &KIO::SimpleJob::finished, this, &DefaultFileAccessJobHandler::slotJobEnded); |
| 274 | |
| 275 | ProgressProxy::enterEventLoop(pJob, i18nc("Message for progress dialog %1 = path to file", "Removing file: %1", FileAccess::prettyAbsPath(fileName))); |
| 276 | #else |
| 277 | if(FileAccess::isLocal(fileName)) |
| 278 | m_bSuccess = QFile::remove(fileName) |
| 279 | #endif |
| 280 | return m_bSuccess; |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | bool DefaultFileAccessJobHandler::symLink(const QUrl& linkTarget, const QUrl& linkLocation) |
| 285 | { |