qt6-bb10/tests/auto/corelib
Marc Mutz 00a8be85d1 Long live QStringView!
QStringView is a simple container for (const QChar*, int) and (const
char16_t*, size_t). It acts as a replacement interface type for const
QString and const QStringRef, and enables passing all kinds of
string-like types to functions otherwise expecting const QString& -
without the need to convert to QString first.

The use of this new class is guarded by a macro that enables three
levels of QStringView support:

 1. offer QStringView, overload some functions taking QString with
    QStringView

 2. like 1, but remove all overloads of functions taking QStringRef,
    leaving only the function taking QStringView.  Do this only where
    QStringRef overloads tradionally existed.

 3. like 2, but replace functions taking QString, too.

This is done in order to measure the impact of QStringView on code
size and execution speed, and to help guide the decision of which
level to choose for Qt 6.

This first patch adds QStringView with most of its planned
constructors, but not much more than iterators and isNull()/isEmpty().

Further patches will add support for QStringView to QStringBuilder,
add QStringView overloads of functions taking QString, and add the
complete API of const QString to QStringView.

[ChangeLog][QtCore][QStringView] New class, superseding const QString
and QStringRef as function parameters, accepting a wide variety of
UTF-16 string data sources, e.g. u"string", std::u16string{,_view},
and, on Windows, L"string", std::wstring{,_view} without converting to
QString first.

Change-Id: Iac273e46b2c61ec2c31b3dacebb29500599d6898
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-24 18:34:35 +00:00
..
animation Merge remote-tracking branch 'origin/5.8' into dev 2017-01-30 12:46:20 +01:00
codecs tst_utf8: Fix one of the overlong sequences to be what we meant 2017-03-01 12:27:17 +00:00
global Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-13 15:55:44 +01:00
io Merge remote-tracking branch 'origin/5.9' into dev 2017-03-20 09:00:44 +01:00
itemmodels QSFPM optimization in dataChanged: don't re-sort if the order didn't change 2017-03-23 14:19:09 +00:00
json Merge remote-tracking branch 'origin/5.8' into dev 2016-11-17 14:43:26 +01:00
kernel Merge remote-tracking branch 'origin/5.9' into dev 2017-03-20 09:00:44 +01:00
mimetypes Properly use the "process" feature 2017-02-27 15:44:46 +00:00
plugin Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-13 15:55:44 +01:00
statemachine Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
thread Merge remote-tracking branch 'origin/5.9' into dev 2017-03-20 09:00:44 +01:00
tools Long live QStringView! 2017-03-24 18:34:35 +00:00
xml tests/auto/corelib/xml: cleanup 2016-08-27 05:09:16 +00:00
corelib.pro Add support for Apple tvOS 2016-05-17 16:11:23 +00:00