qt6-bb10/tests
Marc Mutz c70c81b371 Long live QCryptographicHash::hashInto()!
Until now, QCryptographicHash had a big drawback over the underlying
C APIs: at least one extra memory allocation: Either you created a
QCryptographicHash object (allocates a Private), and enjoy noexcept
addData() and resultView(), or you used the static hash() function
(which creates a Private on the stack, so doesn't need to allocate
one), but then we needed to return in an owning container.

Enter QSpan and hashInto(), which allow the user to provide a buffer
into which to write, and therefore can be completely noexcept and
(apart from a missing optimization which, however, doesn't affect the
API) deliver near C-API efficiency.

We don't have QMutableByteArrayView, which would deal with the
different types of equivalent char types for us, so we overload for
QSpan<std::bytes>, QSpan<char> and QSpan<uchar>, which makes the
overload set accept roughly what QByteArrayView would accept, too.

Return by QByteArrayView because that has a richer API than QSpan,
which lacks (on purpose) string-ish API.

[ChangeLog][QtCore][QCryptographicHash] Added hashInto().

Task-number: QTBUG-125431
Change-Id: I80ecc7151d3418a36c4d5db6d22d0b82c869b19f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-29 14:24:29 +02:00
..
auto Long live QCryptographicHash::hashInto()! 2024-05-29 14:24:29 +02:00
baseline Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00
benchmarks Add copyright and licensing to build system files missing it 2024-05-21 17:23:21 +02:00
global
libfuzzer Add CMYK support to QColorSpace 2024-04-12 21:53:54 +02:00
manual wasm: fix uri-list handling urls 2024-05-29 08:18:06 +10:00
shared Replace incorrect Metal config check in nativewindow.h 2024-05-01 14:24:06 +02:00
testserver Move shbang lines to before copyright headers 2024-05-23 23:58:10 +02:00
CMakeLists.txt Rid of 'special case' markers 2023-04-13 18:30:58 +02:00
README

README

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.