|
|
|
@ -686,15 +686,15 @@ Note* NoteFactory::copyFileAndLoad(const KURL &url, Basket *parent)
|
|
|
|
|
// parent->dontCareOfCreation(fullPath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// KIO::CopyJob *copyJob = KIO::copy(url, KURL(fullPath));
|
|
|
|
|
// parent->connect( copyJob, TQT_SIGNAL(copyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)),
|
|
|
|
|
// parent, TQT_SLOT(slotCopyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)) );
|
|
|
|
|
// TDEIO::CopyJob *copyJob = TDEIO::copy(url, KURL(fullPath));
|
|
|
|
|
// parent->connect( copyJob, TQT_SIGNAL(copyingDone(TDEIO::Job *, const KURL &, const KURL &, bool, bool)),
|
|
|
|
|
// parent, TQT_SLOT(slotCopyingDone(TDEIO::Job *, const KURL &, const KURL &, bool, bool)) );
|
|
|
|
|
|
|
|
|
|
KIO::FileCopyJob *copyJob = new KIO::FileCopyJob(
|
|
|
|
|
TDEIO::FileCopyJob *copyJob = new TDEIO::FileCopyJob(
|
|
|
|
|
url, KURL(fullPath), 0666, /*move=*/false,
|
|
|
|
|
/*overwrite=*/true, /*resume=*/true, /*showProgress=*/true );
|
|
|
|
|
parent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)),
|
|
|
|
|
parent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) );
|
|
|
|
|
parent->connect( copyJob, TQT_SIGNAL(result(TDEIO::Job *)),
|
|
|
|
|
parent, TQT_SLOT(slotCopyingDone2(TDEIO::Job *)) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NoteType::Id type = typeForURL(url, parent); // Use the type of the original file because the target doesn't exist yet
|
|
|
|
@ -703,7 +703,7 @@ Note* NoteFactory::copyFileAndLoad(const KURL &url, Basket *parent)
|
|
|
|
|
|
|
|
|
|
Note* NoteFactory::moveFileAndLoad(const KURL &url, Basket *parent)
|
|
|
|
|
{
|
|
|
|
|
// Globally the same as copyFileAndLoad() but move instead of copy (KIO::move())
|
|
|
|
|
// Globally the same as copyFileAndLoad() but move instead of copy (TDEIO::move())
|
|
|
|
|
TQString fileName = fileNameForNewNote(parent, url.fileName());
|
|
|
|
|
TQString fullPath = parent->fullPathForFileName(fileName);
|
|
|
|
|
|
|
|
|
@ -714,15 +714,15 @@ Note* NoteFactory::moveFileAndLoad(const KURL &url, Basket *parent)
|
|
|
|
|
// parent->dontCareOfCreation(fullPath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// KIO::CopyJob *copyJob = KIO::move(url, KURL(fullPath));
|
|
|
|
|
// parent->connect( copyJob, TQT_SIGNAL(copyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)),
|
|
|
|
|
// parent, TQT_SLOT(slotCopyingDone(KIO::Job *, const KURL &, const KURL &, bool, bool)) );
|
|
|
|
|
// TDEIO::CopyJob *copyJob = TDEIO::move(url, KURL(fullPath));
|
|
|
|
|
// parent->connect( copyJob, TQT_SIGNAL(copyingDone(TDEIO::Job *, const KURL &, const KURL &, bool, bool)),
|
|
|
|
|
// parent, TQT_SLOT(slotCopyingDone(TDEIO::Job *, const KURL &, const KURL &, bool, bool)) );
|
|
|
|
|
|
|
|
|
|
KIO::FileCopyJob *copyJob = new KIO::FileCopyJob(
|
|
|
|
|
TDEIO::FileCopyJob *copyJob = new TDEIO::FileCopyJob(
|
|
|
|
|
url, KURL(fullPath), 0666, /*move=*/true,
|
|
|
|
|
/*overwrite=*/true, /*resume=*/true, /*showProgress=*/true );
|
|
|
|
|
parent->connect( copyJob, TQT_SIGNAL(result(KIO::Job *)),
|
|
|
|
|
parent, TQT_SLOT(slotCopyingDone2(KIO::Job *)) );
|
|
|
|
|
parent->connect( copyJob, TQT_SIGNAL(result(TDEIO::Job *)),
|
|
|
|
|
parent, TQT_SLOT(slotCopyingDone2(TDEIO::Job *)) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NoteType::Id type = typeForURL(url, parent); // Use the type of the original file because the target doesn't exist yet
|
|
|
|
|