summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-22 21:27:37 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-03-19 07:09:55 +0000
commit6ec1dc904d59bab3a0330ff2a6c26600a35c87a9 (patch)
tree14acfbccb73bc6f722492d86900da61338ea17cd /tests/auto/widgets/kernel
parent03de9ff7eefd9e635d16867c231153363acfdf4b (diff)
QSettings: port key processing to QAnyStringView
... in preparation for replacing the QString keys in the public API with QAnyStringView ones. This removes the "important optimization" that avoids a detach in the common case where the input is the same as the output of normalization. But that optimization is beside the point, because it trades a memory allocation avoided in the library for O(N) allocations inserted into user code for each call to QSettings::value(), the vast majority of which are calls with string literals. With the public interface ported to QAnyStringView in the follow-up patch, we can then internally optimize memory allocations _in a central place_ (e.g. by returning std::u16string or QVarLengthArray<QChar> from normalizeKey() instead of QString). But first we need to get rid of all the unwarranted allocations in user code. Change-Id: I45fc83d972c552a220c9c29508001d3f172e1162 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel')
0 files changed, 0 insertions, 0 deletions