Codebase list ktp-filetransfer-handler / 51e3507
Merge branch 'kde-telepathy-0.5' Daniele E. Domenichelli 11 years ago
2 changed file(s) with 11 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
00 project (ktp-filetransfer-handler)
11
2 set(KTP_FILETRANSFER_HANDLER_VERSION "0.5.2")
2 set(KTP_FILETRANSFER_HANDLER_VERSION "0.5.3")
33
44 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
55
189189 fileInfo.lastModified().toTime_t(),
190190 channel->lastModificationTime().toTime_t());
191191
192 q->connect(q, SIGNAL(cancelled()),
192 q->connect(q, SIGNAL(finished(KJob*)),
193193 renameDialog.data(), SLOT(reject()));
194194
195195 q->connect(renameDialog.data(),
225225 url = renameDialog.data()->newDestUrl();
226226 break;
227227 case KIO::R_OVERWRITE:
228 {
229 // Delete the old file if exists
230 QFile oldFile(url.toLocalFile(), 0);
231 if (oldFile.exists()) {
232 oldFile.remove();
233 }
234 }
228235 break;
229236 default:
230237 kWarning() << "Unknown Error";
258265 fileInfo.lastModified().toTime_t(),
259266 channel->lastModificationTime().toTime_t());
260267
261 q->connect(q, SIGNAL(cancelled()),
268 q->connect(q, SIGNAL(finished(KJob*)),
262269 renameDialog.data(), SLOT(reject()));
263270
264271 q->connect(renameDialog.data(),
429436 q->setError(KTp::FileTransferCancelled);
430437 q->setErrorText(i18n("Incoming file transfer was canceled."));
431438 // Close .part file if open
432 if (file->isOpen()) {
439 if (file && file->isOpen()) {
433440 file->close();
434 }
435 // Delete the old file if exists
436 QFile oldFile(url.toLocalFile(), 0);
437 if (oldFile.exists()) {
438 oldFile.remove();
439441 }
440442 q->kill(KJob::Quietly);
441443 break;