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)
bool KMComposerWin::showErrorMessage(KJob *job)
{
if (job->error()) {
if (static_cast<KIO::Job *>(job)->ui()) {
static_cast<KIO::Job *>(job)->ui()->showErrorMessage();
if (static_cast<KIO::Job *>(job)->uiDelegate()) {
static_cast<KIO::Job *>(job)->uiDelegate()->showErrorMessage();
} else {
qCDebug(KMAIL_LOG) << " job->errorString() :" << job->errorString();
}
......
......@@ -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
// so better safe than sorry
KIO::Job *kiojob = qobject_cast<KIO::Job *>(job);
if (kiojob && kiojob->ui()) {
kiojob->ui()->showErrorMessage();
if (kiojob && kiojob->uiDelegate()) {
kiojob->uiDelegate()->showErrorMessage();
} else {
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)
command->setPrintPreview(preview);
command->start();
} else {
if (static_cast<KIO::Job *>(job)->ui()) {
static_cast<KIO::Job *>(job)->ui()->showErrorMessage();
if (static_cast<KIO::Job *>(job)->uiDelegate()) {
static_cast<KIO::Job *>(job)->uiDelegate()->showErrorMessage();
} else {
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