[Development] HEADS-UP: QStringLiteral

Thiago Macieira thiago.macieira at intel.com
Wed Aug 21 16:47:23 CEST 2019


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.

We could do it for literals with some constexpr help in the QString 
constructor, but the equivalent code

	const char *key = "key";
	const char *value = "value";
	test[key] = value;

would not be optimal.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Development mailing list