[Development] FW: Backwards compatibiltiy break in Qt 5.5
Thiago Macieira
thiago.macieira at intel.com
Mon Jul 27 19:11:44 CEST 2015
On Monday 27 July 2015 16:54:49 Knoll Lars wrote:
> QChar::isPrint() is not that expensive, and this is about debug output. Your
> code escaping all these chars is a more expensive if it gets hit.
I don't think so. The code is pretty efficient and it's just a simple stateful
loop. QChar::isPrint requires an out-of-line function call for every character
and then looking it up in our Unicode tables. That's a lot of data for the L1
cache: qstring.o's .rodata section is 188200 bytes.
> And I don't see how homographs are a problem for debug output. Unless you're
> debugging certain rather special cases in which case you should be able to
> turn full escaping on. I would guess that 98% of our users are using qDebug
> differently than you are.
That is again what I am trying to avoid: having to know that you need this
before you actually see the problem.
In any case, if we want to escape characters < 32, we need to escape the
backslash too, which also was a source of complaints in the bug report, as
"C:\Users"
became
"C:\\Users"
Nikolai didn't include this in his mail to the list.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list