Commit 0b335d8f authored by Laurent Montel's avatar Laurent Montel
Browse files

KMessageBox::sorry is deprecated in kf5.97

parent 99299590
Pipeline #210021 passed with stage
in 4 minutes and 16 seconds
......@@ -65,7 +65,7 @@ QStringList ExportPaperKeyCommand::arguments() const
bool ExportPaperKeyCommand::preStartHook(QWidget *parent) const
{
if (paperKeyInstallPath().isNull()) {
KMessageBox::sorry(parent, xi18nc("@info", "<para><application>Kleopatra</application> uses "
KMessageBox::error(parent, xi18nc("@info", "<para><application>Kleopatra</application> uses "
"<application>PaperKey</application> to create a minimized and"
" printable version of your secret key.</para>"
"<para>Please make sure it is installed.</para>"),
......
......@@ -150,7 +150,7 @@ void ImportPaperKeyCommand::postSuccessHook(QWidget *)
void ImportPaperKeyCommand::doStart()
{
if (paperKeyInstallPath().isNull()) {
KMessageBox::sorry(d->parentWidgetOrView(),
KMessageBox::error(d->parentWidgetOrView(),
xi18nc("@info", "<para><application>Kleopatra</application> uses "
"<application>PaperKey</application> to import your "
"text backup.</para>"
......
......@@ -258,7 +258,7 @@ public:
bool validatePage() override
{
if (DeVSCompliance::isActive() && !DeVSCompliance::isCompliant()) {
KMessageBox::sorry(topLevelWidget(),
KMessageBox::error(topLevelWidget(),
xi18nc("@info %1 is a placeholder for the name of a compliance mode. E.g. NATO RESTRICTED compliant or VS-NfD compliant",
"<para>Sorry! You cannot use <application>Kleopatra</application> for signing or encrypting files "
"because the <application>GnuPG</application> system used by <application>Kleopatra</application> is not %1.</para>",
......
......@@ -613,7 +613,7 @@ public:
QGpgME::ChangeOwnerTrustJob *const j = QGpgME::openpgp()->changeOwnerTrustJob();
connect(j, &QGpgME::ChangeOwnerTrustJob::result, q, [this] (const GpgME::Error &err) {
if (err) {
KMessageBox::sorry(q,
KMessageBox::error(q,
i18n("<p>Changing the certification trust of the key <b>%1</b> failed:</p><p>%2</p>",
Formatting::formatForComboBox(secKey()),
QString::fromLocal8Bit(err.asString())),
......
......@@ -182,7 +182,7 @@ private:
void checkAccept()
{
if (!descriptionHasAcceptableInput()) {
KMessageBox::sorry(q, descriptionErrorMessage());
KMessageBox::error(q, descriptionErrorMessage());
} else {
q->accept();
}
......
......@@ -370,7 +370,7 @@ void KleopatraApplication::slotActivateRequested(const QStringList &arguments,
}
if (!err.isEmpty()) {
KMessageBox::sorry(nullptr, err.toHtmlEscaped(), i18n("Failed to execute command"));
KMessageBox::error(nullptr, err.toHtmlEscaped(), i18n("Failed to execute command"));
Q_EMIT setExitValue(1);
return;
}
......@@ -792,7 +792,7 @@ bool KleopatraApplication::ignoreNewInstance() const
void KleopatraApplication::blockUrl(const QUrl &url)
{
qCDebug(KLEOPATRA_LOG) << "Blocking URL" << url;
KMessageBox::sorry(mainWindow(),i18n ("Opening an external link is administratively prohibited."),
KMessageBox::error(mainWindow(),i18n ("Opening an external link is administratively prohibited."),
i18n ("Prohibited"));
}
......
......@@ -135,7 +135,7 @@ void KWatchGnuPGMainWindow::startWatcher()
mWatcher->start();
const bool ok = mWatcher->waitForStarted();
if (!ok) {
KMessageBox::sorry(this, i18n("The watchgnupg logging process could not be started.\nPlease install watchgnupg somewhere in your $PATH.\nThis log window is unable to display any useful information."));
KMessageBox::error(this, i18n("The watchgnupg logging process could not be started.\nPlease install watchgnupg somewhere in your $PATH.\nThis log window is unable to display any useful information."));
} else {
mCentralWidget->append(i18n("[%1] Log started", QDateTime::currentDateTime().toString(Qt::ISODate)));
mCentralWidget->ensureCursorVisible();
......@@ -195,7 +195,7 @@ void KWatchGnuPGMainWindow::setGnuPGConfig()
}
cconfig->sync(true);
if (logclients.isEmpty()) {
KMessageBox::sorry(nullptr, i18n("There are no components available that support logging."));
KMessageBox::error(nullptr, i18n("There are no components available that support logging."));
}
}
......@@ -206,7 +206,7 @@ void KWatchGnuPGMainWindow::slotWatcherExited(int, QProcess::ExitStatus)
mCentralWidget->ensureCursorVisible();
startWatcher();
} else {
KMessageBox::sorry(this, i18n("The watchgnupg logging process is not running.\nThis log window is unable to display any useful information."));
KMessageBox::error(this, i18n("The watchgnupg logging process is not running.\nThis log window is unable to display any useful information."));
}
}
......
......@@ -113,7 +113,7 @@ int main(int argc, char **argv)
{
const GpgME::Error gpgmeInitError = GpgME::initializeLibrary(0);
if (gpgmeInitError) {
KMessageBox::sorry(nullptr, xi18nc("@info",
KMessageBox::error(nullptr, xi18nc("@info",
"<para>The version of the <application>GpgME</application> library you are running against "
"is older than the one that the <application>GpgME++</application> library was built against.</para>"
"<para><application>Kleopatra</application> will not function in this setting.</para>"
......
......@@ -227,7 +227,7 @@ void OpenPGPKeyCardWidget::Private::showCertificateDetails(const std::string &op
return;
}
}
KMessageBox::sorry(q, i18nc("@info", "Sorry, I cannot find the key with fingerprint %1.",
KMessageBox::error(q, i18nc("@info", "Sorry, I cannot find the key with fingerprint %1.",
Formatting::prettyID(widgets.keyFingerprint.c_str())));
}
......
......@@ -386,7 +386,7 @@ public:
void doEncryptSign()
{
if (DeVSCompliance::isActive() && !DeVSCompliance::isCompliant()) {
KMessageBox::sorry(q->topLevelWidget(),
KMessageBox::error(q->topLevelWidget(),
xi18nc("@info %1 is a placeholder for the name of a compliance mode. E.g. NATO RESTRICTED compliant or VS-NfD compliant",
"<para>Sorry! You cannot use <application>Kleopatra</application> for signing or encryption "
"because the <application>GnuPG</application> system used by <application>Kleopatra</application> is not %1.</para>",
......
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