summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorAurélien Brooke <aurelien@bahiasoft.fr>2025-07-18 12:00:31 +0200
committerAurélien Brooke <aurelien@bahiasoft.fr>2025-07-21 23:15:17 +0200
commit3babea74b2acfae64c9db2a42f33ce2c4cfad445 (patch)
tree11076a4d4a32a816113c85ec036e7b7647cd0927 /src/corelib/kernel/qtimer.cpp
parent499edb6a98d1369cbacba8f4a14c1cb921673956 (diff)
moc: add lexem() functions that return QByteArrayViews
In many cases, the result of the lexem() functions is only used as a view and is not stored. To avoid constructing thousands of temporary QByteArray instances, introduce lexemView() and unquotedLexemView() that return a QByteArrayView instead. We need to carefuly remove .constData() calls on previously-QByteArrays, because QByteArrayViews may not be NUL-terminated, so we must transfer the size information to e.g. QString::fromLocal8bit(). This saves only about 3 % of temporary allocs but enables further optimizations. Change-Id: I55e389f7602ac42d3e2f83b38161286d5c17bb48 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions