From d1f40ea0873a36288c6493f1ed5c9952064b9144 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 18 Oct 2023 18:41:01 +0300 Subject: [PATCH] QString: remove isSimpleText method It's legacy method marked as internal. There are zero occurrences of "isSimpleText" anywhere in Qt or Qt Creator other than qstring.* Change-Id: I4961b7b2539fb6552484e77fbea58ba0e6656921 Reviewed-by: Thiago Macieira --- src/corelib/text/qstring.cpp | 20 -------------------- src/corelib/text/qstring.h | 2 -- 2 files changed, 22 deletions(-) diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 50bb0472533..04bb83f3b56 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -9070,26 +9070,6 @@ QString QtPrivate::argToQString(QLatin1StringView pattern, size_t n, const ArgBa return argToQStringImpl(pattern, n, args); } -/*! \fn bool QString::isSimpleText() const - - \internal -*/ -bool QString::isSimpleText() const -{ - const char16_t *p = d.data(); - const char16_t * const end = p + d.size; - while (p < end) { - char16_t uc = *p; - // sort out regions of complex text formatting - if (uc > 0x058f && (uc < 0x1100 || uc > 0xfb0f)) { - return false; - } - p++; - } - - return true; -} - /*! \fn bool QString::isRightToLeft() const Returns \c true if the string is read right to left. diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index 6ec7baf4042..a0ec0c2afd9 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -964,8 +964,6 @@ public: inline bool isNull() const { return d->isNull(); } - - bool isSimpleText() const; bool isRightToLeft() const; [[nodiscard]] bool isValidUtf16() const noexcept { return QStringView(*this).isValidUtf16(); }