I've been working on a fairly large improvement to kcalc. Specifically a much improved knumber library which will eventually bring arbitrary precision trig functions :-).<div><br></div><div>Anyway, looking throughout the code, I see a LOT of usage of QLatin1String and QLatin1Char and I'm not 100% sure what the benefit is.</div>
<div><br></div><div>From the documentation is looks as though it's primary usage is to be able to specify string constants without needed to create a full QString object. here's my question, if that constant is going to become a QString anyway, is there any benefit? For example:</div>
<div><br></div><div>// does this make sense?</div><div>QString func() {</div><div> return QLatin1String("Hello world");</div><div>}</div><div><br></div><div>The documentation is even more vague about the benefits of QLatin1Char, it says it used to avoid codec stuff, which I highly doubt is being used in kcalc. So can I expect there to be any benefit?</div>
<div><br></div><div>Unfortunately while it is used in a lot of places, the usage isn't 100% consistant, based on the fact that things seem to work, I'm not sure what improvement it is offering.</div><div><br></div>
<div>What do you guys think?</div><div><br></div><div>Evan Teran</div>