[Development] Requesting a break in behavior in QML Text element

Bo Thorsen bo at vikingsoft.eu
Fri Jan 30 08:12:48 CET 2015


Den 29-01-2015 kl. 23:24 skrev Robin Burchell:
> Hi,
>
> Rationale: Text.AutoFormat is a terrible misfeature in almost every
> case out there.
> [...]

I agree that it would be better to set plain text as the default. In 
most cases it's what there is in the Text elements anyway. This is at 
least the case for most applications I have come across.

But we can't do this before 6.0. It's a clear API change that will 
affect every single QML application with rich text in Text elements, 
where they don't explicitly set the format. And why would anyone set it 
if they accept rich text? AutoFormat is superior to plain text in that 
it can accept plain text as well.

We would not accept such a change for QWidget based classes, so we can't 
accept it for QML elements either.

The security implications you mention are true enough, but they are 
documented, and it's only a problem where you have user specified 
content. However, calling it a security problem is IMHO stretching the 
argument a bit. The 1pixel argument is not a security problem, it's a 
privacy problem. The batteri usage is not a security problem, it's a 
resource problem. I do agree that this is a valid issue, though.

The whole security argument is based on external loading. So why not add 
a bool property where we can disable this? Seems to me the whole 
argument is pretty much invalid if there was such a property and by 
default this was set to OnlyLocalResources. This would also be good to 
have on Image.

Yes, you are right that AutoFormat takes a few cpu cycles to figure out 
what the contents are. But that's micro optimization and not a great 
argument in an API debate.

Bo.

-- 
Viking Software
Qt and C++ experts for hire
http://www.vikingsoft.eu




More information about the Development mailing list