diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-06-07 18:41:41 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-07-08 08:45:49 +0200 |
commit | 631127126cc14e7c01cc611532b3256b58785670 (patch) | |
tree | a89608313761f045129f6579d5c96d781d64ff31 /src/corelib/global | |
parent | a55e938fb41dfb781cdef6a4e24961a272d2dbab (diff) |
Introduce QByteArrayView
Created a QByteArrayView in symmetry with QStringView.
Added the basic tests symmetrical to QStringView tests.
Moved the implementations of non-modifying methods of QByteArray to
namespace QtPrivate, to be reused inline from both QByteArray and
QByteArrayView. Changed QByteArray's counterparts of those methods to
take QByteArrayView as argument instead of QByteArray. Removed
QByteArray's operator QNoImplicitBoolCast(), because it was causing
ambiguity when calling those methods with QByteArray argument (it was
there to perevnt if(!ba)/if(ba) from compiling, but currently that would
be ambiguous and won't compile anyway).
[ChangeLog][QtCore][QByteArrayView] New class.
Task-number: QTBUG-84321
Change-Id: I05f92e654cf65c95f2bb31b9c9018746ac110426
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 5065a2716f..539e3e7cda 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -598,8 +598,6 @@ using qsizetype = QIntegerForSizeof<std::size_t>::Signed; # define QT_WIN_CALLBACK CALLBACK QT_ENSURE_STACK_ALIGNED_FOR_SSE #endif -typedef int QNoImplicitBoolCast; - /* Utility macros and inline functions */ |