qt5base-lts/tests/auto/corelib
Giuseppe D'Angelo a2ddd96ac8 Introduce QString(View)::isValidUtf16
QString(View)s can be built or manipulated in ways that make them
contain/refer to improperly encoded UTF-16 data. Problem is,
we don't have public APIs to check whether a string contains
valid UTF-16. This knowledge is precious if the string is to be fed in
algorithms, regular expressions, etc. that expect validated input
(e.g. QRegularExpression can be faster if it can assume valid UTF-16,
otherwise it has to employ extra checks).

Add a function that does the validation.

[ChangeLog][QtCore][QStringView] Added QStringView::isValidUtf16.

[ChangeLog][QtCore][QString] Added QString::isValidUtf16.

Change-Id: Idd699183f6ec08013046c76c6a5a7c524b6c6fbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-20 11:13:22 +01:00
..
animation Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
codecs Port from QStringViewLiteral to u"" 2019-07-29 11:17:28 +03:00
global Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-10 13:51:40 +02:00
io MIME: Make the internal database direct content, not a Qt resource 2019-12-10 15:56:09 -08:00
itemmodels QStringListModel: fix moveRows() 2019-12-16 22:12:52 +01:00
kernel Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-12 01:01:04 +01:00
mimetypes Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
plugin Avoid initializing QFlags with 0 or nullptr in tests 2019-11-26 09:08:51 +01:00
serialization Don't wrap feature detection macros with QT_HAS_FOO() variants 2019-12-10 00:48:07 +01:00
statemachine QStateMachine: Don't scream at the user 2019-10-24 10:26:03 +02:00
text Introduce QString(View)::isValidUtf16 2019-12-20 11:13:22 +01:00
thread Don't wrap feature detection macros with QT_HAS_FOO() variants 2019-12-10 00:48:07 +01:00
time Merge remote-tracking branch 'origin/5.14' into 5.15 2019-12-12 01:01:04 +01:00
tools Add QMap::insert(const QMap &map) 2019-12-12 15:25:30 +01:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00