summaryrefslogtreecommitdiffstats
path: root/src/corelib/text
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-02-27 21:16:50 -0800
committerThiago Macieira <thiago.macieira@intel.com>2024-03-26 15:14:55 -0800
commita30912b90667368b74b006432e7de51c583da30e (patch)
treea6445e88265ca43a269b61338f3b30e1a5d6847d /src/corelib/text
parent30225da91f89f7c0356bbc930896ee3e14319aae (diff)
QString::arg: apply the Qt 7 Unicode digit semantics to the bootstrap
Change-Id: I01ec3c774d9943adb903fffd17b7ef0a106944ca Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/text')
-rw-r--r--src/corelib/text/qstring.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 24aa41b1ab..fe9790403f 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -1607,7 +1607,7 @@ int QAnyStringView::compare(QAnyStringView lhs, QAnyStringView rhs, Qt::CaseSens
// ### Qt 7: do not allow anything but ASCII digits
// in arg()'s replacements.
-#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
+#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
static bool supportUnicodeDigitValuesInArg()
{
static const bool result = []() {
@@ -1630,7 +1630,7 @@ static bool supportUnicodeDigitValuesInArg()
static int qArgDigitValue(QChar ch) noexcept
{
-#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
+#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
if (supportUnicodeDigitValuesInArg())
return ch.digitValue();
#endif
@@ -8479,7 +8479,7 @@ QString QString::normalized(QString::NormalizationForm mode, QChar::UnicodeVersi
return copy;
}
-#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
+#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
static void checkArgEscape(QStringView s)
{
// If we're in here, it means that qArgDigitValue has accepted the
@@ -8553,7 +8553,7 @@ static ArgEscapeData findArgEscapes(QStringView s)
// ### Qt 7: do not allow anything but ASCII digits
// in arg()'s replacements.
-#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0)
+#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
const QChar *escapeBegin = c;
const QChar *escapeEnd = escapeBegin + 1;
#endif
@@ -8565,13 +8565,13 @@ static ArgEscapeData findArgEscapes(QStringView s)
if (next_escape != -1) {
escape = (10 * escape) + next_escape;
++c;
-#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0)
+#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
++escapeEnd;
#endif
}
}
-#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0)
+#if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
checkArgEscape(QStringView(escapeBegin, escapeEnd));
#endif