From c54279a1ad521373a5cd5f579b4a1f5e50e64f2d Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 6 Apr 2020 11:43:53 +0200 Subject: Explain what the QStringView levels mean Insofar the information was just in the commit message (00a8be85d168530e71511f6eb265d00fdd747cd3); add that explanation to the code itself. Change-Id: Ice1919c803a31918e8228091b3192728cbbc32f4 Reviewed-by: Thiago Macieira --- src/corelib/text/qstringview.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/corelib/text/qstringview.h') diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h index 7e70238cb2..b3206cc6e7 100644 --- a/src/corelib/text/qstringview.h +++ b/src/corelib/text/qstringview.h @@ -40,6 +40,18 @@ #ifndef QSTRINGVIEW_H #define QSTRINGVIEW_H +/* + This macro enables three "levels" of QStringView support: + + 1. offer QStringView, overload some functions taking QString with + QStringView + + 2. like 1, but remove all overloads of functions taking QStringRef, + leaving only the function taking QStringView. Do this only where + QStringRef overloads tradionally existed. + + 3. like 2, but replace functions taking QString, too. +*/ #ifndef QT_STRINGVIEW_LEVEL # define QT_STRINGVIEW_LEVEL 1 #endif -- cgit v1.2.3