From 4ba25a092065a6422510a9f4afa4fbbabeda686c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 21 Apr 2020 16:30:32 +0200 Subject: QStringIterator: port from uint to char32_t Change-Id: I0ca47b87216478b28e29b0fa1a118ef13b6d7c84 Reviewed-by: Lars Knoll Reviewed-by: Konstantin Ritt --- .../doc/snippets/code/src_corelib_tools_qstringiterator.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/corelib/doc') diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp index eb09fb99e2..8085e32787 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qstringiterator.cpp @@ -62,8 +62,6 @@ QStringIterator i(string); // implicitly converted to QStringView //! [0] //! [1] -// will print 97, 32, 115, 116, etc.; -// that is, the decimal value of the code points in the Unicode string "a string" while (i.hasNext()) qDebug() << i.next(); //! [1] @@ -72,9 +70,9 @@ while (i.hasNext()) { //! [2] QStringIterator i(u"𝄞 is the G clef"); -qDebug() << Qt::hex << i.next(); // will print 1d11e (U+1D11E, MUSICAL SYMBOL G CLEF) -qDebug() << Qt::hex << i.next(); // will print 20 (U+0020, SPACE) -qDebug() << Qt::hex << i.next(); // will print 69 (U+0069, LATIN SMALL LETTER I) +qDebug() << Qt::hex << i.next(); // will print '𝄞' (U+1D11E, MUSICAL SYMBOL G CLEF) +qDebug() << Qt::hex << i.next(); // will print ' ' (U+0020, SPACE) +qDebug() << Qt::hex << i.next(); // will print 'i' (U+0069, LATIN SMALL LETTER I) //! [2] } -- cgit v1.2.3