Do not use QStringView of a temporary
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.