Skip to content

Do not use QStringView of a temporary

Arjen Hiemstra requested to merge work/ahiemstra/unescape_names_asan into master

QString::mid() return a temporary QString. QStringView doesn't actually hold any reference to data, so the temporary gets deleted somewhere after we create the string view, which makes the string view invalid. So instead, use QStringRef here for which there is a separate method.

Merge request reports

Loading