Commit 63328a37 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove deprecated I18N_NOOP macro

parent c41098fa
Pipeline #98176 passed with stage
in 5 minutes and 5 seconds
......@@ -33,6 +33,12 @@
#else
# include <unistd.h>
#endif
#include "ki18n_version.h"
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#include <klazylocalizedstring.h>
#undef I18N_NOOP
#define I18N_NOOP kli18n
#endif
namespace KMime
{
......@@ -43,7 +49,11 @@ namespace MDN
static const struct {
DispositionType dispositionType;
const char *string;
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
const char *description;
#else
const KLazyLocalizedString description;
#endif
} dispositionTypes[] = {
{
Displayed, "displayed",
......@@ -281,7 +291,11 @@ QString descriptionFor(DispositionType d,
{
for (int i = 0 ; i < numDispositionTypes ; ++i) {
if (dispositionTypes[i].dispositionType == d) {
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
return i18n(dispositionTypes[i].description);
#else
return KLocalizedString(dispositionTypes[i].description).toString();
#endif
}
}
qCWarning(KMIME_LOG) << "KMime::MDN::descriptionFor(): No such disposition type:"
......
Markdown is supported
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