) == 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();
* Shows the error information of the job \a job
* in the status bar.
*/
- void slotHandleJobError(KIO::Job* job);
+ void slotHandleJobError(KJob* job);
/**
* Indicates in the status bar that the delete operation
* of the job \a job has been finished.
*/
- void slotDeleteFileFinished(KIO::Job* job);
+ void slotDeleteFileFinished(KJob* job);
/**
* Updates the state of the 'Undo' menu action dependent
* Adds the undo operation given by \a job
* to the UndoManager.
*/
- void addUndoOperation(KIO::Job* job);
+ void addUndoOperation(KJob* job);
void toggleSidebar();
if (job != 0) {
// Execute the jobs in a synchronous manner and forward the progress
// information to the Dolphin statusbar.
- connect(job, SIGNAL(percent(KIO::Job*, unsigned long)),
- this, SLOT(slotPercent(KIO::Job*, unsigned long)));
+ connect(job, SIGNAL(percent(KJob*, unsigned long)),
+ this, SLOT(slotPercent(KJob*, unsigned long)));
KIO::NetAccess::synchronousRun(job, &dolphin);
}
return text;
}
-void UndoManager::slotPercent(KIO::Job* /* job */, unsigned long /* percent */)
+void UndoManager::slotPercent(KJob* /* job */, unsigned long /* percent */)
{
// It is not allowed to update the progress indicator in the context
// of this slot, hence do an asynchronous triggering.
* Delegates the updating of the progress information
* to UndoManager::updateProgress().
*/
- void slotPercent(KIO::Job* job, unsigned long percent);
+ void slotPercent(KJob* job, unsigned long percent);
/**
* Updates the progress information of the statusbar
connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
this, SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&)));
- connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*)));
+ connect(m_listJob, SIGNAL(result(KJob*)), this, SLOT(listJobFinished(KJob*)));
}
void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries)
m_subdirs.sort();
}
-void UrlNavigatorButton::listJobFinished(KIO::Job* job)
+void UrlNavigatorButton::listJobFinished(KJob* job)
{
if (job != m_listJob) {
return;
void stopPopupDelay();
void startListJob();
void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries);
- void listJobFinished(KIO::Job* job);
+ void listJobFinished(KJob* job);
private:
int arrowWidth() const;