Commit 2001fcdc authored by Laurent Montel's avatar Laurent Montel
Browse files

KMessageBox::sorry is deprecated in kf5.97

parent 2e1c0cfe
Pipeline #210019 passed with stage
in 21 minutes and 24 seconds
......@@ -159,7 +159,7 @@ void CSVImportExportPluginInterface::exportCSV()
delete dlg;
if (contacts.isEmpty()) {
KMessageBox::sorry(nullptr, i18n("You have not selected any contacts to export."));
KMessageBox::error(nullptr, i18n("You have not selected any contacts to export."));
return;
}
......
......@@ -571,7 +571,7 @@ void CSVImportDialog::slotOk()
}
if (!assigned) {
KMessageBox::sorry(this, i18nc("@info:status", "You must assign at least one column."));
KMessageBox::error(this, i18nc("@info:status", "You must assign at least one column."));
} else {
accept();
}
......@@ -581,7 +581,7 @@ void CSVImportDialog::applyTemplate()
{
QPointer<TemplateSelectionDialog> dlg = new TemplateSelectionDialog(this);
if (!dlg->templatesAvailable()) {
KMessageBox::sorry(this, i18nc("@label", "There are no templates available yet."), i18nc("@title:window", "No templates available"));
KMessageBox::error(this, i18nc("@label", "There are no templates available yet."), i18nc("@title:window", "No templates available"));
delete dlg;
return;
}
......@@ -696,7 +696,7 @@ void CSVImportDialog::setFile(const QString &fileName)
auto file = new QFile(fileName);
if (!file->open(QIODevice::ReadOnly)) {
KMessageBox::sorry(this, i18nc("@info:status", "Cannot open input file."));
KMessageBox::error(this, i18nc("@info:status", "Cannot open input file."));
delete file;
return;
}
......
......@@ -87,7 +87,7 @@ void GMXImportExportPluginInterface::exportGMX()
delete dlg;
if (contacts.isEmpty()) {
KMessageBox::sorry(nullptr, i18n("You have not selected any contacts to export."));
KMessageBox::error(nullptr, i18n("You have not selected any contacts to export."));
return;
}
......
......@@ -137,7 +137,7 @@ void LDifImportExportPluginInterface::exportLdif()
delete dlg;
if (contacts.isEmpty()) {
KMessageBox::sorry(nullptr, i18n("You have not selected any contacts to export."));
KMessageBox::error(nullptr, i18n("You have not selected any contacts to export."));
return;
}
......
......@@ -379,7 +379,7 @@ void VCardImportExportPluginInterface::exportVCard()
delete dlg;
if (contacts.isEmpty()) {
KMessageBox::sorry(nullptr, i18n("You have not selected any contacts to export."));
KMessageBox::error(nullptr, i18n("You have not selected any contacts to export."));
return;
}
......
......@@ -58,7 +58,7 @@ PimCommon::GenericPluginInterface::RequireTypes CheckGravatarPluginInterface::re
void CheckGravatarPluginInterface::exec()
{
if (mListItems.isEmpty()) {
KMessageBox::sorry(parentWidget(), i18n("You have not selected any contacts."));
KMessageBox::error(parentWidget(), i18n("You have not selected any contacts."));
} else {
if (mListItems.count() == 1) {
Akonadi::Item item = mListItems.constFirst();
......
......@@ -57,7 +57,7 @@ void SendMailPluginInterface::updateActions(int numberOfSelectedItems, int numbe
void SendMailPluginInterface::exec()
{
if (mListItems.isEmpty()) {
KMessageBox::sorry(parentWidget(), i18n("You have not selected any contacts."));
KMessageBox::error(parentWidget(), i18n("You have not selected any contacts."));
} else {
auto mailSender = new KABMailSender::MailSenderJob(mListItems, this);
connect(mailSender, &KABMailSender::MailSenderJob::sendMails, this, &SendMailPluginInterface::slotSendMails);
......
......@@ -931,7 +931,7 @@ public:
return true;
}
if (KEmailAddress::compareEmail(delegateString, incidence->organizer().email(), false)) {
KMessageBox::sorry(nullptr, i18n("Delegation to organizer is not possible."));
KMessageBox::error(nullptr, i18n("Delegation to organizer is not possible."));
return true;
}
}
......@@ -1206,7 +1206,7 @@ public:
Incidence::Ptr incidence = stringToIncidence(iCal);
if (!incidence) {
KMessageBox::sorry(nullptr,
KMessageBox::error(nullptr,
i18n("The calendar invitation stored in this email message is broken in some way. "
"Unable to continue."));
return false;
......
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