QString: replace homebrew toString() with the Real Deal™
QLatin1StringView has had a toString() since Qt 6.0. Remove the wrapper. Pick-to: 6.5 Task-number: QTBUG-124365 Change-Id: I91e1cc9a2be2d01f309d681b5abcaf417fa584da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 23dfacb17d0925d376ea548613ee04c75a4503cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
78974f8219
commit
ef5cba01f8
@ -9019,9 +9019,6 @@ static qsizetype resolveStringRefsAndReturnTotalSize(ParseResult &parts, const A
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
Q_ALWAYS_INLINE QString to_string(QLatin1StringView s) noexcept { return s; }
|
||||
Q_ALWAYS_INLINE QString to_string(QStringView s) noexcept { return s.toString(); }
|
||||
|
||||
template <typename StringView>
|
||||
static QString argToQStringImpl(StringView pattern, size_t numArgs, const QtPrivate::ArgBase **args)
|
||||
{
|
||||
@ -9035,7 +9032,7 @@ static QString argToQStringImpl(StringView pattern, size_t numArgs, const QtPriv
|
||||
argIndexToPlaceholderMap.resize(qsizetype(numArgs));
|
||||
else if (Q_UNLIKELY(static_cast<size_t>(argIndexToPlaceholderMap.size()) < numArgs)) // 3b
|
||||
qWarning("QString::arg: %d argument(s) missing in %ls",
|
||||
int(numArgs - argIndexToPlaceholderMap.size()), qUtf16Printable(to_string(pattern)));
|
||||
int(numArgs - argIndexToPlaceholderMap.size()), qUtf16Printable(pattern.toString()));
|
||||
|
||||
// 5
|
||||
const qsizetype totalSize = resolveStringRefsAndReturnTotalSize(parts, argIndexToPlaceholderMap, args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user