[pim/grantleetheme] src: Remove unnecessary Localizer overrides

Volker Krause <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 808b6ecbfb5fb22a3621bfc99ff7089d90eab1eb by Volker Krause.
Committed on 27/07/2026 at 15:40.
Pushed by vkrause into branch 'master'.

Remove unnecessary Localizer overrides

Those are meanwhile done correctly in KTextTemplate itself (and monetary
value formatting is something we don't even use here).

M  +0    -15   src/grantleeki18nlocalizer.cpp
M  +0    -16   src/grantleeki18nlocalizer.h

https://invent.kde.org/pim/grantleetheme/-/commit/808b6ecbfb5fb22a3621bfc99ff7089d90eab1eb

diff --git a/src/grantleeki18nlocalizer.cpp b/src/grantleeki18nlocalizer.cpp
index fee0084..2dd278d 100644
--- a/src/grantleeki18nlocalizer.cpp
+++ b/src/grantleeki18nlocalizer.cpp
@@ -93,21 +93,6 @@ QString GrantleeKi18nLocalizer::localizePluralString(const QString &string, cons
     return processArguments(str, arguments);
 }
 
-QString GrantleeKi18nLocalizer::localizeMonetaryValue(qreal value, const QString &currencySymbol) const
-{
-    return QLocale(currentLocale()).toCurrencyString(value, currencySymbol);
-}
-
-QString GrantleeKi18nLocalizer::currentLocale() const
-{
-    QString locale = KTextTemplate::QtLocalizer::currentLocale();
-    const int f = locale.indexOf(QLatin1Char('_'));
-    if (f >= 0) {
-        locale.truncate(f);
-    }
-    return locale;
-}
-
 void GrantleeKi18nLocalizer::setApplicationDomain(const QByteArray &domain)
 {
     mApplicationDomain = domain;
diff --git a/src/grantleeki18nlocalizer.h b/src/grantleeki18nlocalizer.h
index 5ea48a7..a14b621 100644
--- a/src/grantleeki18nlocalizer.h
+++ b/src/grantleeki18nlocalizer.h
@@ -71,22 +71,6 @@ public:
      */
     [[nodiscard]] QString localizePluralString(const QString &string, const QString &pluralForm, const QVariantList &arguments) const override;
 
-    // Only exception, Grantlee's implementation is not using QLocale for this
-    // for some reason
-    /*!
-     * \brief Localizes a monetary value using KI18n.
-     * \param value The monetary value to localize
-     * \param currentCode The currency code
-     * \return The localized monetary value as a string
-     */
-    [[nodiscard]] QString localizeMonetaryValue(qreal value, const QString &currentCode) const override;
-
-    /*!
-     * \brief Returns the current locale.
-     * \return The current locale identifier
-     */
-    [[nodiscard]] QString currentLocale() const override;
-
     /*!
      * \brief Sets the application translation domain.
      * \param domain The translation domain to use
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.