[Development] optimizing QComposeInputContext / TableGenerator?

Kevin Kofler kevin.kofler at chello.at
Tue Jan 20 13:20:56 CET 2015


Milian Wolff wrote:
> Did you just create that? If so, then it would need to get published by
> you as a patch as you are the author.

Yes, I wrote that function. I can submit it through Gerrit if you think this 
is a useful contribution.

I guess there will be some discussion about how to handle errors though, 
especially if we want this function added to the public QChar API. I'm just 
returning 0 for errors right now (including non-BMP characters, which don't 
fit in a single QChar).

> Also, best would be if we could share the code with the existing UTF8
> decoders.

I'm not sure how that's doable considering that on one hand, the point of 
the code here is to avoid the string allocation (so we don't want to go 
through QString to get QChar), on the other hand, building the QString 
decoders on top of the new method does not look doable to me either, because 
of the non-BMP character and error handling issues. The code is really 
optimized for the case where we have a single QChar to decode.

        Kevin Kofler




More information about the Development mailing list