From 9800c4f9b744c128da1bc0c6d791894eb96b7335 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 7 Aug 2019 11:11:03 +0000 Subject: [PATCH] replace QLocale::LastScript with scriptTblSize for consistency Signed-off-by: Ivailo Monev --- src/core/tools/qlocale.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tools/qlocale.cpp b/src/core/tools/qlocale.cpp index 49213584b..c6065289a 100644 --- a/src/core/tools/qlocale.cpp +++ b/src/core/tools/qlocale.cpp @@ -93,7 +93,7 @@ QLocale::Script QLocalePrivate::codeToScript(const QString &code) title[0] = code.at(0).toUpper(); } - for (qint16 i = 0; i < QLocale::LastScript; i++) { + for (qint16 i = 0; i < scriptTblSize; i++) { if (QString::fromLatin1(scriptTbl[i].code) == title) return scriptTbl[i].script; } @@ -279,7 +279,7 @@ bool qt_splitLocaleName(const QString &name, QString &lang, QString &script, QSt // if it wasn't a script, maybe it is a country then? cntry = value; state = NoState; - for (qint16 i = 0; i < QLocale::LastScript; i++) { + for (qint16 i = 0; i < scriptTblSize; i++) { if (QString::fromLatin1(scriptTbl[i].code) == value) { script = value; state = CountryState; -- 2.11.0