[Development] HEADS-UP: QStringLiteral

Konstantin Tokarev annulen at yandex.ru
Wed Aug 21 17:24:59 CEST 2019



21.08.2019, 18:22, "Tor Arne Vestbø" <tor.arne.vestbo at qt.io>:
>>  On 21 Aug 2019, at 16:55, Thiago Macieira <thiago.macieira at intel.com> wrote:
>>
>>  On Wednesday, 21 August 2019 07:47:23 PDT Thiago Macieira wrote:
>>>  On Wednesday, 21 August 2019 03:01:29 PDT Tor Arne Vestbø wrote:
>>>>  This should just be test[“key”] = “value”. How do we get there?
>>>
>>>  Do you mean "make this the most optimal?" If so, then we don't get there.
>>>  It's not possible.
>>
>>  Oh, the following is nearly the most optimal:
>>
>>          test[u"key"] = u"value”;
>
> So that would be utf16, can’t we let test["key"] = “value” assume utf8, ie u8”foo” without the explicitness?

Conversion of UTF8 to UTF16 costs more, and here we know that literal is ASCII-only.

-- 
Regards,
Konstantin




More information about the Development mailing list