diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-10-11 13:42:01 -0700 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-07 14:17:45 +0100 |
commit | 41287d355b9571db0fbdf5841b31595705af0102 (patch) | |
tree | 150fcfba72714a6e9ff94cad0d909016de973902 /src/corelib/tools/qarraydatapointer.h | |
parent | 329ec3a268d636cc2cd4e403b5323c4d65723d33 (diff) |
Add QArrayData::sharedNullData()
Just to simplify a few operations, like detecting when a QChar* or char*
coming from a QString or QByteArray, respectively, were null data.
While you're not supposed to dereference the pointer returned by
QVector::data() unless you know that the array is non-empty, that is
permitted for QString and QByteArray. That is, QString().constData()
must return a valid pointer to a null QChar.
Change-Id: I80b4b62f203dc841e5c99c20c51d92ca576e4bfe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/tools/qarraydatapointer.h')
0 files changed, 0 insertions, 0 deletions