diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-04-06 11:43:53 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-05-09 23:49:42 +0200 |
commit | c54279a1ad521373a5cd5f579b4a1f5e50e64f2d (patch) | |
tree | ee34e3ef93eb8aa184011757ade02f68466730db /src/corelib/text/qstringview.h | |
parent | a34fa92c29c904951d6f77e422144423045dc259 (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringview.h')
-rw-r--r-- | src/corelib/text/qstringview.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |