diff --git a/kdecore/localization/klocale.cpp b/kdecore/localization/klocale.cpp index c1bfc391..eff35d32 100644 --- a/kdecore/localization/klocale.cpp +++ b/kdecore/localization/klocale.cpp @@ -526,11 +526,6 @@ void KLocale::setActiveCatalog(const QString &catalog) KLocalizedString::notifyCatalogsUpdated(languageList()); } -void KLocale::translateRaw(const char *msg, QString *lang, QString *trans) const -{ - translateRaw(nullptr, msg, lang, trans); -} - void KLocale::translateRaw(const char *ctxt, const char *msg, QString *lang, QString *trans) const { foreach (const KCatalog &catalog, d->catalogs) { @@ -549,12 +544,6 @@ void KLocale::translateRaw(const char *ctxt, const char *msg, QString *lang, QSt *trans = QString::fromUtf8(msg); } -void KLocale::translateRaw(const char *singular, const char *plural, unsigned long n, QString *lang, - QString *trans) const -{ - translateRaw(nullptr, singular, plural, n, lang, trans); -} - void KLocale::translateRaw(const char *ctxt, const char *singular, const char *plural, unsigned long n, QString *lang, QString *trans) const { diff --git a/kdecore/localization/klocale.h b/kdecore/localization/klocale.h index 7fc02c13..50038804 100644 --- a/kdecore/localization/klocale.h +++ b/kdecore/localization/klocale.h @@ -412,24 +412,6 @@ public: */ void setActiveCatalog(const QString &catalog); - /** - * @since 4.5 - * - * Raw translation from all loaded catalogs. - * - * Never use this directly to get message translations. See the i18n and ki18n family of calls - * related to KLocalizedString. - * - * @param msg the message. Must not be null or empty. Must be UTF-8 encoded. - * @param lang language in which the translation was found. If no translation was found, - * KLocale::defaultLanguage() is reported. If null, the language is not reported. - * @param trans raw translation, or original if not found. If no translation was found, - * original message is reported. If null, the translation is not reported. - * - * @see KLocalizedString - */ - void translateRaw(const char *msg, QString *lang, QString *trans) const; - /** * @since 4.5 * @@ -439,7 +421,7 @@ public: * Never use this directly to get message translations. See @p i18n and @p ki18n calls related * to KLocalizedString. * - * @param ctxt the context. Must not be null. Must be UTF-8 encoded. + * @param ctxt the context. May be null. Must be UTF-8 encoded. * @param msg the message. Must not be null or empty. Must be UTF-8 encoded. * @param lang language in which the translation was found. If no translation was found, * KLocale::defaultLanguage() is reported. If null, the language is not reported. @@ -450,28 +432,6 @@ public: */ void translateRaw(const char *ctxt, const char *msg, QString *lang, QString *trans) const; - /** - * @since 4.5 - * - * Raw translation from all loaded catalogs, with given singular/plural form. Singular form is - * used as the lookup key in the catalog. - * - * Never use this directly to get message translations. See @p i18n and @p ki18n calls related - * to KLocalizedString. - * - * @param singular the singular form. Must not be null or empty. Must be UTF-8 encoded. - * @param plural the plural form. Must not be null. Must be UTF-8 encoded. - * @param n number on which the forms are decided. - * @param lang language in which the translation was found. If no translation was found, - * KLocale::defaultLanguage() is reported. If null, the language is not reported. - * @param trans raw translation, or original if not found. If no translation was found, - * original message is reported (either plural or singular, as determined by - * @p n). If null, the translation is not reported. - * - * @see KLocalizedString - */ - void translateRaw(const char *singular, const char *plural, unsigned long n, - QString *lang, QString *trans) const; /** * @since 4.5 * @@ -481,7 +441,7 @@ public: * Never use this directly to get message translations. See @p i18n and @p ki18n calls related * to KLocalizedString. * - * @param ctxt the context. Must not be null. Must be UTF-8 encoded. + * @param ctxt the context. May be null. Must be UTF-8 encoded. * @param singular the singular form. Must not be null or empty. Must be UTF-8 encoded. * @param plural the plural form. Must not be null. Must be UTF-8 encoded. * @param n number on which the forms are decided. diff --git a/kdecore/localization/klocalizedstring.cpp b/kdecore/localization/klocalizedstring.cpp index 918363d1..2aebdcc3 100644 --- a/kdecore/localization/klocalizedstring.cpp +++ b/kdecore/localization/klocalizedstring.cpp @@ -167,11 +167,11 @@ QString KLocalizedStringPrivate::toString (const KLocale *locale) const if (!ctxt.isEmpty() && !plural.isEmpty()) { locale->translateRaw(ctxt, msg, plural, number, &lang, &rawtrans); } else if (!plural.isEmpty()) { - locale->translateRaw(msg, plural, number, &lang, &rawtrans); + locale->translateRaw(nullptr, msg, plural, number, &lang, &rawtrans); } else if (!ctxt.isEmpty()) { locale->translateRaw(ctxt, msg, &lang, &rawtrans); } else { - locale->translateRaw(msg, &lang, &rawtrans); + locale->translateRaw(nullptr, msg, &lang, &rawtrans); } } else { lang = KLocale::defaultLanguage(); diff --git a/kdecore/tests/klocalizedstringtest.cpp b/kdecore/tests/klocalizedstringtest.cpp index 455b2806..e7e31cd4 100644 --- a/kdecore/tests/klocalizedstringtest.cpp +++ b/kdecore/tests/klocalizedstringtest.cpp @@ -229,7 +229,7 @@ void KLocalizedStringTest::translateQt() // So let's use translateRaw instead for the threaded test QString lang; - KGlobal::locale()->translateRaw("Landscape", &lang, &result); + KGlobal::locale()->translateRaw(nullptr, "Landscape", &lang, &result); QCOMPARE(lang, m_hasFrench ? QString("fr") : QString("en_US")); // it finds it in kdeqt.po QCOMPARE(result, m_hasFrench ? QString("Paysage") : QString("Landscape")); }