Commit 47856687 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Change deprecated (KF>=5.0) KIO::Job::ui() to KIO::Job::uiDelegate()

parent 51e79677
......@@ -38,7 +38,7 @@ void Trash::trashUrls(const QList<QUrl> &urls)
KIO::JobUiDelegate uiDelegate;
if (uiDelegate.askDeleteConfirmation(urls, KIO::JobUiDelegate::Trash, KIO::JobUiDelegate::DefaultConfirmation)) {
KIO::Job *job = KIO::trash(urls);
job->ui()->setAutoErrorHandlingEnabled(true);
job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
......@@ -48,7 +48,7 @@ void Trash::emptyTrash()
uiDelegate.setWindow(QApplication::desktop());
if (uiDelegate.askDeleteConfirmation(QList<QUrl>(), KIO::JobUiDelegate::EmptyTrash, KIO::JobUiDelegate::DefaultConfirmation)) {
KIO::Job *job = KIO::emptyTrash();
job->ui()->setAutoErrorHandlingEnabled(true);
job->uiDelegate()->setAutoErrorHandlingEnabled(true);
}
}
......
......@@ -399,7 +399,7 @@ bool DesktopPathConfig::moveDir( const QUrl & src, const QUrl & dest, const QStr
KIO::ListJob* job = KIO::listDir( src );
job->setAutoDelete(false); // see <noautodelete> below
KJobWidgets::setWindow(job, this);
job->ui()->setAutoErrorHandlingEnabled(true);
job->uiDelegate()->setAutoErrorHandlingEnabled(true);
connect(job, &KIO::ListJob::entries, this, &DesktopPathConfig::slotEntries);
// slotEntries will move every file/subdir individually into the dest
job->exec();
......@@ -447,7 +447,7 @@ void DesktopPathConfig::slotResult( KJob * job )
// If the source doesn't exist, no wonder we couldn't move the dir.
// In that case, trust the user and set the new setting in any case.
static_cast<KIO::Job*>(job)->ui()->showErrorMessage();
static_cast<KIO::Job*>(job)->uiDelegate()->showErrorMessage();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment