Review Request 126001: In KConfigTest::testEntryMap, convert QByteArray with nulls using a char *
David Faure
faure at kde.org
Mon Nov 9 14:41:51 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126001/#review88194
-----------------------------------------------------------
Ship it!
Ah, yes, I read the code too fast.
Indeed I expect QByteArrays to contain embedded NULs, but not QStrings.
- David Faure
On Nov. 9, 2015, 12:23 a.m., Matthew Dawson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126001/
> -----------------------------------------------------------
>
> (Updated Nov. 9, 2015, 12:23 a.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Repository: kconfig
>
>
> Description
> -------
>
> Due to https://codereview.qt-project.org/#/c/106473/, Qt 5.6 keeps null
> characters in QByteArray -> QString conversions, which breaks this test as
> one QByteArray contains nulls. Instead, convert the QByteArray to const
> char * first, so QString stops at the first null.
>
> The actual behaviour of KConfig is unchanged, as internally the conversion
> always went through a const char *, which avoids creating QStrings with
> null characters.
>
>
> Diffs
> -----
>
> autotests/kconfigtest.cpp 9a2998647b5e5f54d63059172b727505a8ae1c80
>
> Diff: https://git.reviewboard.kde.org/r/126001/diff/
>
>
> Testing
> -------
>
> Tested on both Qt 5.5.1 and Qt 5.6 (commit e996d68f6130847637ba287518cff1289cfa48e5), tests all pass now.
>
>
> Thanks,
>
> Matthew Dawson
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151109/88ba136c/attachment.html>
More information about the Kde-frameworks-devel
mailing list