summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:05:33 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 14:02:43 +0200
commit7cbee5629604aa49c618829c8e3e55fc64e94df7 (patch)
treed12041105160c1cb21226b365edb9653d87b5853 /src/corelib/tools/qbytearray.cpp
parente400b7e326c554ccd819448866265953d2a0f24d (diff)
parent5f0ce2333f7e11a3ffb5d16a27cd9303efa712d5 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r--src/corelib/tools/qbytearray.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index b5b48324e7..19c27d9ff8 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -4791,4 +4791,26 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA
\internal
*/
+/*!
+ \macro QByteArrayLiteral(ba)
+ \relates QByteArray
+
+ The macro generates the data for a QByteArray out of the string literal
+ \a ba at compile time. Creating a QByteArray from it is free in this case, and
+ the generated byte array data is stored in the read-only segment of the
+ compiled object file.
+
+ For instance:
+
+ \code
+ QByteArray ba = QByteArrayLiteral("byte array contents");
+ \endcode
+
+ Using QByteArrayLiteral instead of a double quoted plain C++ string literal
+ can significantly speed up creation of QByteArray instances from data known
+ at compile time.
+
+ \sa QStringLiteral
+*/
+
QT_END_NAMESPACE