Clean up exports from qlocale_p.h

Explain why QSystemLocale needs to be an export. Unexport
QLocaleId::fromName() now that qttools no longer uses it.
QLocalePrivate was only Q_CORE_EXPORT for the sake of one use in
tst_QLocale, that can now be replaced by a call to a public QLocale
method.

Change-Id: I1efe8ee03488acfc6e1c36661f6e956a86e191c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Edward Welbourne 2021-09-01 13:39:22 +02:00
parent 62b7130423
commit 7db0eeae34
2 changed files with 4 additions and 3 deletions

View File

@ -68,6 +68,7 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_SYSTEMLOCALE
struct QLocaleData;
// Subclassed by Android platform plugin:
class Q_CORE_EXPORT QSystemLocale
{
public:
@ -154,7 +155,7 @@ namespace QIcu {
struct QLocaleId
{
[[nodiscard]] Q_CORE_EXPORT static QLocaleId fromName(QStringView name);
[[nodiscard]] static QLocaleId fromName(QStringView name);
[[nodiscard]] inline bool operator==(QLocaleId other) const
{ return language_id == other.language_id && script_id == other.script_id && territory_id == other.territory_id; }
[[nodiscard]] inline bool operator!=(QLocaleId other) const
@ -403,7 +404,7 @@ public:
quint8 m_grouping_least : 3; // Number of digits after last grouping separator (before decimal).
};
class Q_CORE_EXPORT QLocalePrivate
class QLocalePrivate
{
public:
constexpr QLocalePrivate(const QLocaleData *data, const uint index,

View File

@ -2974,7 +2974,7 @@ void tst_QLocale::textDirection_data()
default:
break;
}
const QLatin1String testName = QLocalePrivate::languageToCode(QLocale::Language(language));
const QString testName = QLocale::languageToCode(QLocale::Language(language));
QTest::newRow(qPrintable(testName)) << language << int(QLocale::AnyScript) << rightToLeft;
}
QTest::newRow("pa_Arab") << int(QLocale::Punjabi) << int(QLocale::ArabicScript) << true;