Commit b87f80fd authored by Laurent Montel's avatar Laurent Montel 😁

Remove deprecated method

parent 9f89af29
...@@ -1897,8 +1897,8 @@ void KMComposerWin::slotInsertRecentFile(const QUrl &u) ...@@ -1897,8 +1897,8 @@ void KMComposerWin::slotInsertRecentFile(const QUrl &u)
bool KMComposerWin::showErrorMessage(KJob *job) bool KMComposerWin::showErrorMessage(KJob *job)
{ {
if (job->error()) { if (job->error()) {
if (static_cast<KIO::Job *>(job)->ui()) { if (static_cast<KIO::Job *>(job)->uiDelegate()) {
static_cast<KIO::Job *>(job)->ui()->showErrorMessage(); static_cast<KIO::Job *>(job)->uiDelegate()->showErrorMessage();
} else { } else {
qCDebug(KMAIL_LOG) << " job->errorString() :" << job->errorString(); qCDebug(KMAIL_LOG) << " job->errorString() :" << job->errorString();
} }
......
...@@ -152,8 +152,8 @@ static void showJobError(KJob *job) ...@@ -152,8 +152,8 @@ static void showJobError(KJob *job)
// we can be called from the KJob::kill, where we are no longer a KIO::Job // we can be called from the KJob::kill, where we are no longer a KIO::Job
// so better safe than sorry // so better safe than sorry
KIO::Job *kiojob = qobject_cast<KIO::Job *>(job); KIO::Job *kiojob = qobject_cast<KIO::Job *>(job);
if (kiojob && kiojob->ui()) { if (kiojob && kiojob->uiDelegate()) {
kiojob->ui()->showErrorMessage(); kiojob->uiDelegate()->showErrorMessage();
} else { } else {
qCWarning(KMAIL_LOG) << "There is no GUI delegate set for a kjob, and it failed with error:" << job->errorString(); qCWarning(KMAIL_LOG) << "There is no GUI delegate set for a kjob, and it failed with error:" << job->errorString();
} }
......
...@@ -762,8 +762,8 @@ void KMReaderWin::slotPrintComposeResult(KJob *job) ...@@ -762,8 +762,8 @@ void KMReaderWin::slotPrintComposeResult(KJob *job)
command->setPrintPreview(preview); command->setPrintPreview(preview);
command->start(); command->start();
} else { } else {
if (static_cast<KIO::Job *>(job)->ui()) { if (static_cast<KIO::Job *>(job)->uiDelegate()) {
static_cast<KIO::Job *>(job)->ui()->showErrorMessage(); static_cast<KIO::Job *>(job)->uiDelegate()->showErrorMessage();
} else { } else {
qCWarning(KMAIL_LOG) << "Composer for printing failed:" << composer->errorString(); qCWarning(KMAIL_LOG) << "Composer for printing failed:" << composer->errorString();
} }
......
Markdown is supported
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