- Revert 1092427 and use the standard KJob error handling methods

BUG: 144723


svn path=/trunk/KDE/kdebase/apps/; revision=1092437
This commit is contained in:
Darío Andrés Rodríguez 2010-02-18 22:51:31 +00:00
parent f98f136c54
commit dbac0c2664
2 changed files with 3 additions and 22 deletions

View file

@ -42,6 +42,7 @@
#include <kio/netaccess.h>
#include <kio/copyjob.h>
#include <kio/deletejob.h>
#include <kjobuidelegate.h>
#include <konq_operations.h>
#include <knewfilemenu.h>
@ -627,7 +628,7 @@ void KFindTreeView::deleteSelectedFiles()
if ( done )
{
KJob * deleteJob = KIO::del( uris );
connect(deleteJob, SIGNAL(result(KJob*)), this, SLOT(deleteJobResult(KJob*)));
deleteJob->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
@ -642,7 +643,7 @@ void KFindTreeView::moveToTrashSelectedFiles()
if ( done )
{
KJob * trashJob = KIO::trash( uris );
connect(trashJob, SIGNAL(result(KJob*)), this, SLOT(trashJobResult(KJob*)));
trashJob->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
@ -664,23 +665,6 @@ void KFindTreeView::updateMouseButtons()
m_mouseButtons = QApplication::mouseButtons();
}
void KFindTreeView::deleteJobResult(KJob *job)
{
if (job->error()) {
KMessageBox::sorry(this, job->errorString() + "\n" + i18n("The operation was cancelled."),
i18nc("messagebox title", "Error when deleting files"));
}
}
void KFindTreeView::trashJobResult(KJob *job)
{
if (job->error()) {
KMessageBox::sorry(this, job->errorString() + "\n" + i18n("The operation was cancelled."),
i18nc("messagebox title", "Error when moving files to trash"));
}
}
//END KFindTreeView
#include "kfindtreeview.moc"

View file

@ -124,10 +124,7 @@ class KFindTreeView: public QTreeView
KUrl::List selectedUrls();
void deleteSelectedFiles();
void deleteJobResult(KJob *job);
void moveToTrashSelectedFiles();
void trashJobResult(KJob *job);
void slotExecute( const QModelIndex & index );
void slotExecuteSelected();