From 75ea5a03353c2c3e0a6337a003a583bc7fa84f98 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Sun, 20 Mar 2022 13:28:40 +0100 Subject: [PATCH] Fix build on macOS without warning after QString::count deprecation Pick-to: 6.3 Change-Id: Ie043289c258fadbfafaf4a88b9695f0e65699de8 Reviewed-by: Marc Mutz --- src/corelib/text/qcollator_macx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/text/qcollator_macx.cpp b/src/corelib/text/qcollator_macx.cpp index 8adc640fa7..9a34110391 100644 --- a/src/corelib/text/qcollator_macx.cpp +++ b/src/corelib/text/qcollator_macx.cpp @@ -130,12 +130,12 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const // Documentation recommends having it 5 times as big as the input QList ret(string.size() * 5); ItemCount actualSize; - int status = UCGetCollationKey(d->collator, text, string.count(), + int status = UCGetCollationKey(d->collator, text, string.size(), ret.size(), &actualSize, ret.data()); ret.resize(actualSize + 1); if (status == kUCOutputBufferTooSmall) { - status = UCGetCollationKey(d->collator, text, string.count(), + status = UCGetCollationKey(d->collator, text, string.size(), ret.size(), &actualSize, ret.data()); Q_ASSERT(status != kUCOutputBufferTooSmall); Q_ASSERT(ret.size() == qsizetype(actualSize + 1));