qt6-bb10/tests/auto/corelib
Ahmad Samir d9637d0781 QString: don't detach in removeStringImpl()
- If this string is not shared, modify it directly
- If this string is shared, instead of detaching copy the characters
  from this string, except the ones that are going to be removed, to a
  new string and swap it. This is more efficient than detaching, which
  would copy the whole string including the characters that are going
  to be removed.

This affects:
remove(const QString &str, Qt::CaseSensitivity cs)
remove(QLatin1StringView str, Qt::CaseSensitivity cs)

Adjust the unittests to test both code paths.

[ChangeLog][QtCore][QString] Improved the performance of
QString::remove() by avoiding unnecessary data copying. Now, if this
string is (implicitly) shared with another, instead of copying
everything and then removing what we don't want, the characters from
this string are copied to the destination, except the ones that need to
be removed.

Task-number: QTBUG-106181
Change-Id: Id8eba59a44bab641cc8aa662eb45063faf201183
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-17 02:15:28 +00:00
..
animation Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
global QOperatingSystemVersion: add tests for the globals 2022-10-28 14:42:40 -07:00
io Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
itemmodels Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
kernel tst_QVariant: convert some test functions to table-driven 2022-11-09 04:05:50 -07:00
mimetypes Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
platform Android: Fix incorrect fullscreen dimensions 2022-11-07 09:06:34 +00:00
plugin Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
serialization Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
text QString: don't detach in removeStringImpl() 2022-11-17 02:15:28 +00:00
thread tests: fix build with -no-feature-concurrent 2022-11-09 20:33:49 +01:00
time Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
tools Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00