Commit f3440e5b authored by Laurent Montel's avatar Laurent Montel
Browse files

KMessageBox::sorry is deprecated in kf5.97

parent b645c6da
Pipeline #210015 passed with stage
in 5 minutes and 10 seconds
......@@ -373,7 +373,7 @@ void FreeBusyManagerPrivate::processFreeBusyDownloadResult(KJob *_job)
Q_ASSERT(job);
if (job->error()) {
qCritical() << "Error downloading freebusy" << _job->errorString();
KMessageBox::sorry(mParentWidgetForRetrieval,
KMessageBox::error(mParentWidgetForRetrieval,
i18n("Failed to download free/busy data from: %1\nReason: %2", job->url().toDisplayString(), job->errorText()),
i18n("Free/busy retrieval error"));
......@@ -396,7 +396,7 @@ void FreeBusyManagerPrivate::processFreeBusyDownloadResult(KJob *_job)
Q_EMIT q->freeBusyRetrieved(fb, email);
} else {
qCritical() << "Error downloading freebusy, invalid fb.";
KMessageBox::sorry(mParentWidgetForRetrieval,
KMessageBox::error(mParentWidgetForRetrieval,
i18n("Failed to parse free/busy information that was retrieved from: %1", job->url().toDisplayString()),
i18n("Free/busy retrieval error"));
}
......@@ -411,7 +411,7 @@ void FreeBusyManagerPrivate::processFreeBusyUploadResult(KJob *_job)
{
auto job = static_cast<KIO::FileCopyJob *>(_job);
if (job->error()) {
KMessageBox::sorry(nullptr,
KMessageBox::error(nullptr,
i18n("<qt><p>The software could not upload your free/busy list to "
"the URL '%1'. There might be a problem with the access "
"rights, or you specified an incorrect URL. The system said: "
......@@ -740,7 +740,7 @@ void FreeBusyManager::publishFreeBusy(QWidget *parentWidget)
QUrl targetURL(CalendarSettings::self()->freeBusyPublishUrl());
if (targetURL.isEmpty()) {
KMessageBox::sorry(parentWidget,
KMessageBox::error(parentWidget,
i18n("<qt><p>No URL configured for uploading your free/busy list. "
"Please set it in KOrganizer's configuration dialog, on the "
"\"Free/Busy\" page.</p>"
......@@ -755,7 +755,7 @@ void FreeBusyManager::publishFreeBusy(QWidget *parentWidget)
return;
}
if (!targetURL.isValid()) {
KMessageBox::sorry(parentWidget, i18n("<qt>The target URL '%1' provided is invalid.</qt>", targetURL.toDisplayString()), i18n("Invalid URL"));
KMessageBox::error(parentWidget, i18n("<qt>The target URL '%1' provided is invalid.</qt>", targetURL.toDisplayString()), i18n("Invalid URL"));
d->mBrokenUrl = true;
return;
}
......
......@@ -248,7 +248,7 @@ void IncidenceChangerPrivate::handleCreateJobResult(KJob *job)
item = change->newItem;
qCritical() << errorString;
if (mShowDialogsOnError) {
KMessageBox::sorry(change->parentWidget, i18n("Error while trying to create calendar item. Error was: %1", errorString));
KMessageBox::error(change->parentWidget, i18n("Error while trying to create calendar item. Error was: %1", errorString));
}
mChangeById.remove(change->id);
change->errorString = errorString;
......@@ -327,7 +327,7 @@ void IncidenceChangerPrivate::handleDeleteJobResult(KJob *job)
qCritical() << errorString;
if (mShowDialogsOnError) {
KMessageBox::sorry(change->parentWidget, i18n("Error while trying to delete calendar item. Error was: %1", errorString));
KMessageBox::error(change->parentWidget, i18n("Error while trying to delete calendar item. Error was: %1", errorString));
}
for (const Item &item : items) {
......@@ -399,7 +399,7 @@ void IncidenceChangerPrivate::handleModifyJobResult(KJob *job)
qCritical() << errorString;
}
if (mShowDialogsOnError) {
KMessageBox::sorry(change->parentWidget, i18n("Error while trying to modify calendar item. Error was: %1", errorString));
KMessageBox::error(change->parentWidget, i18n("Error while trying to modify calendar item. Error was: %1", errorString));
}
mChangeById.remove(change->id);
change->errorString = errorString;
......@@ -1197,7 +1197,7 @@ QString IncidenceChangerPrivate::showErrorDialog(IncidenceChanger::ResultCode re
}
if (mShowDialogsOnError) {
KMessageBox::sorry(parent, errorString);
KMessageBox::error(parent, errorString);
}
return errorString;
......
......@@ -118,7 +118,7 @@ void PublishDialog::accept()
QString badAddress;
const KEmailAddress::EmailParseResult addressOk = KEmailAddress::isValidAddressList(addresses(), badAddress);
if (addressOk != KEmailAddress::AddressOk) {
KMessageBox::sorry(this,
KMessageBox::error(this,
i18n("Unable to publish the calendar incidence due to an "
"invalid recipients string. %1",
emailParseResultToString(addressOk)),
......
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