) == KMessageBox::Continue;
if (del) {
KIO::Job* job = KIO::del(list);
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotHandleJobError(KIO::Job*)));
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotDeleteFileFinished(KIO::Job*)));
+ connect(job, SIGNAL(result(KJob*)),
+ this, SLOT(slotHandleJobError(KJob*)));
+ connect(job, SIGNAL(result(KJob*)),
+ this, SLOT(slotDeleteFileFinished(KJob*)));
}
}
close();
}
-void Dolphin::slotHandleJobError(KIO::Job* job)
+void Dolphin::slotHandleJobError(KJob* job)
{
if (job->error() != 0) {
m_activeView->statusBar()->setMessage(job->errorString(),
}
}
-void Dolphin::slotDeleteFileFinished(KIO::Job* job)
+void Dolphin::slotDeleteFileFinished(KJob* job)
{
if (job->error() == 0) {
m_activeView->statusBar()->setMessage(i18n("Delete operation completed."),
dlg.exec();
}
-void Dolphin::addUndoOperation(KIO::Job* job)
+void Dolphin::addUndoOperation(KJob* job)
{
if (job->error() != 0) {
slotHandleJobError(job);
// all source Urls must be updated with the trash Url. E. g. when moving
// a file "test.txt" and a second file "test.txt" to the trash,
// then the filenames in the trash are "0-test.txt" and "1-test.txt".
- QMap<QString, QString> metaData = job->metaData();
+ QMap<QString, QString> metaData;
+ KIO::Job *kiojob = qobject_cast<KIO::Job*>( job );
+ if ( kiojob )
+ {
+ metaData = kiojob->metaData();
+ }
KUrl::List newSourceUrls;
KUrl::List sourceUrls = command.source();
const KUrl::List& source,
const KUrl& dest)
{
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(addUndoOperation(KIO::Job*)));
+ connect(job, SIGNAL(result(KJob*)),
+ this, SLOT(addUndoOperation(KJob*)));
UndoInfo undoInfo;
undoInfo.id = job->progressId();