| 237 | } |
| 238 | |
| 239 | bool DefaultFileAccessJobHandler::rmDirImp(const QString& dirName) |
| 240 | { |
| 241 | if(dirName.isEmpty()) |
| 242 | return false; |
| 243 | |
| 244 | FileAccess fa(dirName); |
| 245 | if(fa.isLocal()) |
| 246 | { |
| 247 | return QDir().rmdir(fa.absoluteFilePath()); |
| 248 | } |
| 249 | else |
| 250 | { |
| 251 | m_bSuccess = false; |
| 252 | #if HAS_KFKIO |
| 253 | KIO::SimpleJob* pJob = KIO::rmdir(fa.url()); |
| 254 | chk_connect(pJob, &KIO::SimpleJob::result, this, &DefaultFileAccessJobHandler::slotSimpleJobResult); |
| 255 | chk_connect(pJob, &KIO::SimpleJob::finished, this, &DefaultFileAccessJobHandler::slotJobEnded); |
| 256 | |
| 257 | ProgressProxy::enterEventLoop(pJob, i18nc("Message for progress dialog %1 = path to file", "Removing folder: %1", dirName)); |
| 258 | #endif |
| 259 | return m_bSuccess; |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | bool DefaultFileAccessJobHandler::removeFile(const QUrl& fileName) |
| 264 | { |
no test coverage detected