diff --git a/src/dolphin.cpp b/src/dolphin.cpp index ac1f067a4..db4f46889 100644 --- a/src/dolphin.cpp +++ b/src/dolphin.cpp @@ -555,10 +555,10 @@ void Dolphin::deleteItems() ) == 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*))); } } @@ -586,7 +586,7 @@ void Dolphin::quit() close(); } -void Dolphin::slotHandleJobError(KIO::Job* job) +void Dolphin::slotHandleJobError(KJob* job) { if (job->error() != 0) { m_activeView->statusBar()->setMessage(job->errorString(), @@ -594,7 +594,7 @@ void Dolphin::slotHandleJobError(KIO::Job* job) } } -void Dolphin::slotDeleteFileFinished(KIO::Job* job) +void Dolphin::slotDeleteFileFinished(KJob* job) { if (job->error() == 0) { m_activeView->statusBar()->setMessage(i18n("Delete operation completed."), @@ -1000,7 +1000,7 @@ void Dolphin::editSettings() dlg.exec(); } -void Dolphin::addUndoOperation(KIO::Job* job) +void Dolphin::addUndoOperation(KJob* job) { if (job->error() != 0) { slotHandleJobError(job); @@ -1028,7 +1028,12 @@ void Dolphin::addUndoOperation(KIO::Job* 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 metaData = job->metaData(); + QMap metaData; + KIO::Job *kiojob = qobject_cast( job ); + if ( kiojob ) + { + metaData = kiojob->metaData(); + } KUrl::List newSourceUrls; KUrl::List sourceUrls = command.source(); @@ -1613,8 +1618,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job, 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(); diff --git a/src/dolphin.h b/src/dolphin.h index c1e481a5d..0013b4de8 100644 --- a/src/dolphin.h +++ b/src/dolphin.h @@ -215,13 +215,13 @@ private slots: * 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 @@ -366,7 +366,7 @@ private slots: * Adds the undo operation given by \a job * to the UndoManager. */ - void addUndoOperation(KIO::Job* job); + void addUndoOperation(KJob* job); void toggleSidebar(); diff --git a/src/undomanager.cpp b/src/undomanager.cpp index cf7d97713..4e3ec054b 100644 --- a/src/undomanager.cpp +++ b/src/undomanager.cpp @@ -313,8 +313,8 @@ void UndoManager::redo() 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); } @@ -358,7 +358,7 @@ QString UndoManager::commandText(const DolphinCommand& command) const 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. diff --git a/src/undomanager.h b/src/undomanager.h index 145c232e1..ac2c2bb37 100644 --- a/src/undomanager.h +++ b/src/undomanager.h @@ -165,7 +165,7 @@ private slots: * 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 diff --git a/src/urlnavigatorbutton.cpp b/src/urlnavigatorbutton.cpp index fab2b81e9..f9c5b407b 100644 --- a/src/urlnavigatorbutton.cpp +++ b/src/urlnavigatorbutton.cpp @@ -282,7 +282,7 @@ void UrlNavigatorButton::startListJob() 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) @@ -330,7 +330,7 @@ void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent m_subdirs.sort(); } -void UrlNavigatorButton::listJobFinished(KIO::Job* job) +void UrlNavigatorButton::listJobFinished(KJob* job) { if (job != m_listJob) { return; diff --git a/src/urlnavigatorbutton.h b/src/urlnavigatorbutton.h index 5ce54b31d..f0a69ea34 100644 --- a/src/urlnavigatorbutton.h +++ b/src/urlnavigatorbutton.h @@ -75,7 +75,7 @@ private slots: 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;