qt5base-lts/tests/auto
Ahmad Samir 26fec96a81 QString, QByteArray: don't detach in removeIf/erase/eraseif()
If the object is shared, instead of detaching, copy characters from
"this" to a new object except for the chacters that would be erased,
this is more efficient than detaching (which would copy the whole data
then erase).

- Extend tst_QString::removeIf() to catch a corner-case (that I saw
  with tst_QByteArray::removeIf()).

- Add q_uninitialized_remove_copy_if, which works like
  std::remove_copy_if but for uninitialized memory like
  q_uninitialized_relocate_n (but copies rather than relocates/moves).
  With the same static_assert from q_relocate_overlap_n that the type
  destructor is non-throwing.

Added q_uninitialized_remove_copy_if in this commit rather than a
separate one so that it's unittested by its usage in eraseIf().

[ChangeLog][QtCore][QString, QByteArray] Removing characters from a
currently shared string or byte array is now done more efficiently

Task-number: QTBUG-106181
Task-number: QTBUG-106183
Change-Id: Icc0ed31633cef71d482b97e0d2d20d763163d383
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-09 16:46:39 +02:00
..
bic/data Revert "Revert "Add binary compatibility file generated against 6.4.0"" 2023-01-23 14:51:55 +00:00
cmake Slow Deprecation of FILENAME_VARIABLE, replacement by OUTPUT_SCRIPT 2023-01-05 21:56:21 +01:00
concurrent Skip tst_qconcurrentrun completely if running under an emulator 2022-12-19 15:31:10 +00:00
corelib QString, QByteArray: don't detach in removeIf/erase/eraseif() 2023-02-09 16:46:39 +02:00
dbus Adapt to QTimeZone replacing Qt::TimeSpec usage 2022-12-10 06:39:44 +01:00
gui rhi: Add D3D12 support 2023-02-07 13:33:01 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network Skip socket and server tests on Ubuntu 22.04 and QEMU 2023-02-05 18:50:30 +00:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Make tst_QFocusEvent::checkReason_ActiveWindow pass on macOS 2023-01-30 13:19:41 +00:00
printsupport Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql SQL tests: Fix for PostgreSQL 12 and above 2023-01-20 15:51:17 +01:00
testlib tst_Selftests: rewrite this with templates instead of macro 2023-01-12 00:00:20 -07:00
tools Add simple project generation based on existing source files 2023-02-08 12:59:19 +01:00
wasm Fix typo in QWasmWindowStack's name 2022-10-20 16:36:23 +02:00
widgets Unblacklist stable tst_QWidgetRepaintManager 2023-02-03 18:44:55 +01:00
xml QDomDocument: ensure a defined order of attributes when saving 2022-12-09 16:29:11 +01:00
CMakeLists.txt Add forwarding of CMake variables to ABI-specific external projects 2022-12-08 23:24:22 +01:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00