Update string literals
Since _ls is now deprecated this is removed in favour of L1, I've also taken the oportunity to replace QStringLiteral and QLatin1String with their shortened form while we're at it. There are also a few instances where the string literal type has been switch, the general rule being to use the one that matches the function type or value being compared to avoid conversions.
This commit is contained in:
@@ -91,11 +91,11 @@ for line in response.text.split("\n"):
|
||||
if escaped_sequence in emoji_unicode_shortname_map:
|
||||
shortcode = emoji_unicode_shortname_map[escaped_sequence]
|
||||
|
||||
emoji_args = 'QString::fromUtf8("{0}"), QStringLiteral("{1}"), QStringLiteral("{2}")'.format(escaped_sequence, shortcode, description)
|
||||
emoji_args = 'QString::fromUtf8("{0}"), u"{1}"_s, u"{2}"_s'.format(escaped_sequence, shortcode, description)
|
||||
emoji_qvariant = 'QVariant::fromValue(Emoji{' + emoji_args + '})'
|
||||
|
||||
if is_skin_tone:
|
||||
tones_file.write("{QStringLiteral(\"" + description.split(":")[0] + "\"), " + emoji_qvariant + "},\n")
|
||||
tones_file.write("{u\"" + description.split(":")[0] + "\"_s, " + emoji_qvariant + "},\n")
|
||||
continue
|
||||
file.write("_emojis[" + group + "].append(" + emoji_qvariant + ");\n")
|
||||
file.close()
|
||||
|
||||
Reference in New Issue
Block a user