From eae22d9a484f2fba0e7250450df4d2f565f10731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Fri, 19 Jan 2024 15:11:01 +0100 Subject: [PATCH] qt: Remove left-over mentions of showErrorDialog * lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportjob.cpp: Remove obsolete comment. * lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmelistallkeysjob.cpp: Remove long obsolete, #if 0'ed out definitions of showErrorDialog. -- Informing the users about errors is the responsibility of the users of the QGpgME Job API since a long time. --- lang/qt/src/qgpgmedecryptjob.cpp | 2 -- lang/qt/src/qgpgmeimportfromkeyserverjob.cpp | 2 -- lang/qt/src/qgpgmeimportjob.cpp | 2 -- lang/qt/src/qgpgmekeylistjob.cpp | 14 +------------- lang/qt/src/qgpgmelistallkeysjob.cpp | 13 ------------- 5 files changed, 1 insertion(+), 32 deletions(-) diff --git a/lang/qt/src/qgpgmedecryptjob.cpp b/lang/qt/src/qgpgmedecryptjob.cpp index 37c7ee18..5b7d7ae5 100644 --- a/lang/qt/src/qgpgmedecryptjob.cpp +++ b/lang/qt/src/qgpgmedecryptjob.cpp @@ -126,8 +126,6 @@ GpgME::DecryptionResult QGpgME::QGpgMEDecryptJob::exec(const QByteArray &cipherT return mResult; } -//PENDING(marc) implement showErrorDialog() - void QGpgMEDecryptJob::resultHook(const result_type &tuple) { mResult = std::get<0>(tuple); diff --git a/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp b/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp index 8f3b326f..6395b8d9 100644 --- a/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp +++ b/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp @@ -78,8 +78,6 @@ GpgME::ImportResult QGpgME::QGpgMEImportFromKeyserverJob::exec(const std::vector return mResult; } -// PENDING(marc) implement showErrorDialog() - void QGpgME::QGpgMEImportFromKeyserverJob::resultHook(const result_type &tuple) { mResult = std::get<0>(tuple); diff --git a/lang/qt/src/qgpgmeimportjob.cpp b/lang/qt/src/qgpgmeimportjob.cpp index 1d838150..f1410700 100644 --- a/lang/qt/src/qgpgmeimportjob.cpp +++ b/lang/qt/src/qgpgmeimportjob.cpp @@ -166,8 +166,6 @@ Error QGpgMEImportJob::startLater(const QByteArray &certData) return {}; } -// PENDING(marc) implement showErrorDialog() - void QGpgME::QGpgMEImportJob::resultHook(const result_type &tuple) { mResult = std::get<0>(tuple); diff --git a/lang/qt/src/qgpgmekeylistjob.cpp b/lang/qt/src/qgpgmekeylistjob.cpp index 706d2575..e395359a 100644 --- a/lang/qt/src/qgpgmekeylistjob.cpp +++ b/lang/qt/src/qgpgmekeylistjob.cpp @@ -161,17 +161,5 @@ void QGpgMEKeyListJob::addMode(KeyListMode mode) { context()->addKeyListMode(mode); } -#if 0 -void QGpgMEKeyListJob::showErrorDialog(QWidget *parent, const QString &caption) const -{ - if (!mResult.error() || mResult.error().isCanceled()) { - return; - } - const QString msg = i18n("

An error occurred while fetching " - "the keys from the backend:

" - "

%1

", - QString::fromLocal8Bit(mResult.error().asString())); - KMessageBox::error(parent, msg, caption); -} -#endif + #include "qgpgmekeylistjob.moc" diff --git a/lang/qt/src/qgpgmelistallkeysjob.cpp b/lang/qt/src/qgpgmelistallkeysjob.cpp index 48f8dc3d..1c498053 100644 --- a/lang/qt/src/qgpgmelistallkeysjob.cpp +++ b/lang/qt/src/qgpgmelistallkeysjob.cpp @@ -245,17 +245,4 @@ void QGpgMEListAllKeysJob::resultHook(const result_type &tuple) mResult = std::get<0>(tuple); } -#if 0 -void QGpgMEListAllKeysJob::showErrorDialog(QWidget *parent, const QString &caption) const -{ - if (!mResult.error() || mResult.error().isCanceled()) { - return; - } - const QString msg = i18n("

An error occurred while fetching " - "the keys from the backend:

" - "

%1

", - QString::fromLocal8Bit(mResult.error().asString())); - KMessageBox::error(parent, msg, caption); -} -#endif #include "qgpgmelistallkeysjob.moc"