|
|
|
@ -76,7 +76,7 @@ FileOpObject::FileOpObject(const KURL::List& list,TQWidget* parent)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FileOpObject::slotResult(KIO::Job* job) {
|
|
|
|
|
void FileOpObject::slotResult(TDEIO::Job* job) {
|
|
|
|
|
if (job->error()) {
|
|
|
|
|
job->showErrorDialog(mParent);
|
|
|
|
|
}
|
|
|
|
@ -88,10 +88,10 @@ void FileOpObject::slotResult(KIO::Job* job) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FileOpObject::polishJob(KIO::Job* job) {
|
|
|
|
|
void FileOpObject::polishJob(TDEIO::Job* job) {
|
|
|
|
|
job->setWindow(mParent->topLevelWidget());
|
|
|
|
|
connect( job, TQT_SIGNAL( result(KIO::Job*) ),
|
|
|
|
|
this, TQT_SLOT( slotResult(KIO::Job*) ) );
|
|
|
|
|
connect( job, TQT_SIGNAL( result(TDEIO::Job*) ),
|
|
|
|
|
this, TQT_SLOT( slotResult(TDEIO::Job*) ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -121,7 +121,7 @@ void FileOpCopyToObject::operator()() {
|
|
|
|
|
if (destURL.isEmpty()) return;
|
|
|
|
|
|
|
|
|
|
// Copy the file
|
|
|
|
|
KIO::Job* job=KIO::copy(mURLList,destURL,true);
|
|
|
|
|
TDEIO::Job* job=TDEIO::copy(mURLList,destURL,true);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -153,7 +153,7 @@ void FileOpLinkToObject::operator()() {
|
|
|
|
|
if (destURL.isEmpty()) return;
|
|
|
|
|
|
|
|
|
|
// Copy the file
|
|
|
|
|
KIO::Job* job=KIO::link(mURLList,destURL,true);
|
|
|
|
|
TDEIO::Job* job=TDEIO::link(mURLList,destURL,true);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -182,7 +182,7 @@ void FileOpMoveToObject::operator()() {
|
|
|
|
|
if (destURL.isEmpty()) return;
|
|
|
|
|
|
|
|
|
|
// Move the file
|
|
|
|
|
KIO::Job* job=KIO::move(mURLList,destURL,true);
|
|
|
|
|
TDEIO::Job* job=TDEIO::move(mURLList,destURL,true);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -199,24 +199,24 @@ void FileOpMakeDirObject::operator()() {
|
|
|
|
|
|
|
|
|
|
KURL newURL(mURLList.first());
|
|
|
|
|
newURL.addPath(newDir);
|
|
|
|
|
KIO::Job* job=KIO::mkdir(newURL);
|
|
|
|
|
TDEIO::Job* job=TDEIO::mkdir(newURL);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static KIO::Job* createTrashJob(KURL::List lst) {
|
|
|
|
|
static TDEIO::Job* createTrashJob(KURL::List lst) {
|
|
|
|
|
KURL trashURL("trash:/");
|
|
|
|
|
// Go do it
|
|
|
|
|
if (lst.count()==1) {
|
|
|
|
|
// If there's only one file, KIO::move will think we want to overwrite
|
|
|
|
|
// If there's only one file, TDEIO::move will think we want to overwrite
|
|
|
|
|
// the trash dir with the file to trash, so we add the file name
|
|
|
|
|
trashURL.addPath(lst.first().fileName());
|
|
|
|
|
}
|
|
|
|
|
return KIO::move(lst, trashURL);
|
|
|
|
|
return TDEIO::move(lst, trashURL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static KIO::Job* createDeleteJob(KURL::List lst) {
|
|
|
|
|
return KIO::del(lst, false, true);
|
|
|
|
|
static TDEIO::Job* createDeleteJob(KURL::List lst) {
|
|
|
|
|
return TDEIO::del(lst, false, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -233,7 +233,7 @@ void FileOpDelObject::operator()() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KIO::Job* job;
|
|
|
|
|
TDEIO::Job* job;
|
|
|
|
|
if (shouldDelete) {
|
|
|
|
|
job = createDeleteJob(mURLList);
|
|
|
|
|
} else {
|
|
|
|
@ -264,7 +264,7 @@ void FileOpTrashObject::operator()() {
|
|
|
|
|
if (response!=KMessageBox::Continue) return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KIO::Job* job = createTrashJob(mURLList);
|
|
|
|
|
TDEIO::Job* job = createTrashJob(mURLList);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -296,7 +296,7 @@ void FileOpRealDeleteObject::operator()() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Delete the file
|
|
|
|
|
KIO::Job* job = createDeleteJob(mURLList);
|
|
|
|
|
TDEIO::Job* job = createDeleteJob(mURLList);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -327,12 +327,12 @@ void FileOpRenameObject::operator()() {
|
|
|
|
|
// Rename the file
|
|
|
|
|
KURL destURL=srcURL;
|
|
|
|
|
destURL.setFileName(mNewFilename);
|
|
|
|
|
KIO::Job* job=KIO::move(srcURL,destURL);
|
|
|
|
|
TDEIO::Job* job=TDEIO::move(srcURL,destURL);
|
|
|
|
|
polishJob(job);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FileOpRenameObject::slotResult(KIO::Job* job) {
|
|
|
|
|
void FileOpRenameObject::slotResult(TDEIO::Job* job) {
|
|
|
|
|
if (job->error()) {
|
|
|
|
|
job->showErrorDialog(mParent);
|
|
|
|
|
}
|
|
|
|
|