summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtranslator.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-03-29 00:24:50 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-30 11:21:34 +0200
commit4ef5a6269c1465662ea3872596ba284a13cce25e (patch)
tree4297badfef7832b9bee0ba6ce4b4163726f60e40 /src/corelib/kernel/qtranslator.cpp
parentbe4554d934bb443363911339de25aa160fe1c2e8 (diff)
Add tests to verify QByteArray's zero termination
For data allocated and maintained by QByteArray, there's a guarantee that data() is null-terminated. This holds true even for null and empty, where logically the terminating character should never be dereferenced. For tests that modify or generate QByteArrays, this ensures the invariant is kept. In the toFromHex() text, const-ness of temporary variables was dropped to enable the test macro to be used, as the qualification didn't add much to the test otherwise. Change-Id: I7ee52e79e3a9df7de18c743f3698dab688e6bf0e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qtranslator.cpp')
0 files changed, 0 insertions, 0 deletions