summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_objecttrees.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-05-23 11:47:08 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-05-30 20:52:42 +0200
commit5677c111cb9ae143c1cec53106560d473571b1b7 (patch)
treea02b18b8e1d73fa8d58564f29fdbd3458c369fe1 /doc/src/snippets/code/doc_src_objecttrees.cpp
parent32610561e3e7480ea103e730c11e5e3a9675a54a (diff)
QFormData(Part)Builder: simplify filename formattingHEADdev
We don't need the bodyName member, because it's the same as originalBodyName, just encoded, and we can delay the encoding to build() time. This is not worse than the old code, since we anyway toString() the QAnyStringView unconditionally. So we don't need to visit the QASV and implement RFC2232 encoding for all three view types, we can just use the QString version, after toString(). This not only has the advantage of less code and not storing duplicate data, but we now also encode u8"ä.txt" the same as "ä.txt"_L1 and u"ä.txt", ie. using latin1, as required by Postel's Law, and not as UTF-8, as the old code did. Change-Id: If82a33a1cd09b859b3a4450a60083b1d3aedf7bc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'doc/src/snippets/code/doc_src_objecttrees.cpp')
0 files changed, 0 insertions, 0 deletions