Commit 6c5db327 authored by Laurent Montel's avatar Laurent Montel
Browse files

KMessageBox::sorry is deprecated in kf5.97

parent 00123565
Pipeline #210024 passed with stage
in 12 minutes and 58 seconds
......@@ -1032,7 +1032,7 @@ bool ActionManager::saveAsURL(const QUrl &url)
mTempFile = tempFile;
setTitle();
} else {
KMessageBox::sorry(dialogParent(), i18n("Unable to save calendar to the file %1.", mFile), i18n("Error"));
KMessageBox::error(dialogParent(), i18n("Unable to save calendar to the file %1.", mFile), i18n("Error"));
qCDebug(KORGANIZER_LOG) << "failed";
mURL = URLOrig;
mFile = fileOrig;
......@@ -1075,7 +1075,7 @@ void ActionManager::configureDateTime()
proc << QStringLiteral("kcmshell5") << QStringLiteral("formats") << QStringLiteral("translations") << QStringLiteral("clock");
if (!proc.startDetached()) {
KMessageBox::sorry(dialogParent(), i18n("Could not start control module for date and time format."));
KMessageBox::error(dialogParent(), i18n("Could not start control module for date and time format."));
}
}
......
......@@ -801,7 +801,7 @@ void CalendarView::edit_paste()
}
if (!finalDateTime.isValid() && curView->supportsDateNavigation()) {
KMessageBox::sorry(this, i18n("Paste failed: unable to determine a valid target date."));
KMessageBox::error(this, i18n("Paste failed: unable to determine a valid target date."));
return;
}
......@@ -1539,9 +1539,9 @@ void CalendarView::dissociateOccurrence(const Akonadi::Item &item, const QDate &
(void)mChanger->createIncidence(newInc, item.parentCollection(), this);
} else {
if (thisAndFuture) {
KMessageBox::sorry(this, i18n("Dissociating the future occurrences failed."), i18n("Dissociating Failed"));
KMessageBox::error(this, i18n("Dissociating the future occurrences failed."), i18n("Dissociating Failed"));
} else {
KMessageBox::sorry(this, i18n("Dissociating the occurrence failed."), i18n("Dissociating Failed"));
KMessageBox::error(this, i18n("Dissociating the occurrence failed."), i18n("Dissociating Failed"));
}
}
endMultiModify();
......@@ -2347,7 +2347,7 @@ void CalendarView::warningChangeFailed(const Akonadi::Item &item)
{
KCalendarCore::Incidence::Ptr incidence = Akonadi::CalendarUtils::incidence(item);
if (incidence) {
KMessageBox::sorry(this, i18nc("@info", "Unable to edit \"%1\" because it is locked by another process.", incidence->summary()));
KMessageBox::error(this, i18nc("@info", "Unable to edit \"%1\" because it is locked by another process.", incidence->summary()));
}
}
......@@ -2359,7 +2359,7 @@ void CalendarView::showErrorMessage(const QString &msg)
void CalendarView::addIncidenceOn(const Akonadi::Item &itemadd, const QDate &dt)
{
if (!CalendarSupport::hasIncidence(itemadd)) {
KMessageBox::sorry(this, i18n("Unable to copy the item to %1.", dt.toString()), i18n("Copying Failed"));
KMessageBox::error(this, i18n("Unable to copy the item to %1.", dt.toString()), i18n("Copying Failed"));
return;
}
Akonadi::Item item = mCalendar->item(itemadd.id());
......@@ -2394,7 +2394,7 @@ void CalendarView::addIncidenceOn(const Akonadi::Item &itemadd, const QDate &dt)
void CalendarView::moveIncidenceTo(const Akonadi::Item &itemmove, QDate dt)
{
if (!CalendarSupport::hasIncidence(itemmove)) {
KMessageBox::sorry(this, i18n("Unable to move the item to %1.", dt.toString()), i18n("Moving Failed"));
KMessageBox::error(this, i18n("Unable to move the item to %1.", dt.toString()), i18n("Moving Failed"));
return;
}
Akonadi::Item item = mCalendar->item(itemmove.id());
......
......@@ -112,7 +112,7 @@ void SearchDialog::doSearch()
re.setCaseSensitivity(Qt::CaseInsensitive);
re.setPattern(m_ui->searchEdit->text());
if (!re.isValid()) {
KMessageBox::sorry(this,
KMessageBox::error(this,
i18nc("@info",
"Invalid search expression, cannot perform the search. "
"Please enter a search expression using the wildcard characters "
......
......@@ -65,7 +65,7 @@ int KOrganizerApp::activate(const QStringList &args, const QString &workingDir)
}
auto fetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
if (fetchJob->count() != 1) {
KMessageBox::sorry(nullptr, i18n("Failed to retrieve incidence from Akonadi: requested incidence doesn't exist."));
KMessageBox::error(nullptr, i18n("Failed to retrieve incidence from Akonadi: requested incidence doesn't exist."));
return;
}
KOrg::MainWindow *korg = ActionManager::findInstance(QUrl());
......
......@@ -54,5 +54,5 @@ bool KOHelper::isStandardCalendar(Akonadi::Collection::Id id)
void KOHelper::showSaveIncidenceErrorMsg(QWidget *parent, const KCalendarCore::Incidence::Ptr &incidence)
{
KMessageBox::sorry(parent, i18n("Unable to save %1 \"%2\".", i18n(incidence->typeStr().constData()), incidence->summary()));
KMessageBox::error(parent, i18n("Unable to save %1 \"%2\".", i18n(incidence->typeStr().constData()), incidence->summary()));
}
......@@ -461,7 +461,7 @@ void KOViewManager::selectWorkWeek()
QDate date = mMainView->activeDate();
mMainView->dateNavigator()->selectWorkWeek(date);
} else {
KMessageBox::sorry(mMainView,
KMessageBox::error(mMainView,
i18n("Unable to display the work week since there are no work days configured. "
"Please properly configure at least 1 work day in the Time and Date preferences."));
}
......
......@@ -197,7 +197,7 @@ void KOPrefsDialogPlugins::configureClicked(QAction *action)
slotWidChanged();
} else {
KMessageBox::sorry(this, i18nc("@info", "Unable to configure this plugin"), QStringLiteral("PluginConfigUnable"));
KMessageBox::error(this, i18nc("@info", "Unable to configure this plugin"), QStringLiteral("PluginConfigUnable"));
}
}
......
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