diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp index ca1791c18b..52c77bb267 100644 --- a/src/corelib/text/qbytearraymatcher.cpp +++ b/src/corelib/text/qbytearraymatcher.cpp @@ -124,10 +124,12 @@ QByteArrayMatcher::QByteArrayMatcher() } /*! - Constructs a byte array matcher from \a pattern. \a pattern - has the given \a length. \a pattern must remain in scope, but - the destructor does not delete \a pattern. - */ + Constructs a byte array matcher from \a pattern. \a pattern + has the given \a length. Call indexIn() to perform a search. + + \note the data that \a pattern is referencing must remain valid while this + object is used. +*/ QByteArrayMatcher::QByteArrayMatcher(const char *pattern, qsizetype length) : d(nullptr) { p.p = reinterpret_cast(pattern); @@ -157,6 +159,9 @@ QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern) Constructs a byte array matcher that will search for \a pattern. Call indexIn() to perform a search. + + \note the data that \a pattern is referencing must remain valid while this + object is used. */ /*!