From ff54eed29242fade7774cc1a954ec83182c14535 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 30 Apr 2022 14:08:45 +0200 Subject: [PATCH] QLibrary: fix use of deprecated QByteArrayMatcher::indexIn(p, n) Use the QByteArrayView overload instead. Deprecated since 6.3, so backporting: Change-Id: I529104cad59260eed371cedb1ae84a7e9086bbf6 Reviewed-by: Sona Kurazyan (cherry picked from commit 4e66c69bad1235d08d82de75d50617ad7d15a3ea) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/plugin/qlibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 0cbd54c5bc9..6a3f13bb818 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -188,7 +188,7 @@ static QLibraryScanResult qt_find_pattern(const char *s, qsizetype s_len, QStrin static_assert(pattern == magic); return qMakeStaticByteArrayMatcher(pattern); }(); - qsizetype i = matcher.indexIn(s, s_len); + qsizetype i = matcher.indexIn({s, s_len}); if (i < 0) { *errMsg = QLibrary::tr("'%1' is not a Qt plugin").arg(*errMsg); return QLibraryScanResult{};