Review Request 124515: KCharselect: Fix unicode category and use boundingRect for width calculation
David Faure
faure at kde.org
Wed Jul 29 07:53:02 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124515/#review83129
-----------------------------------------------------------
src/kcharselect.cpp (line 255)
<https://git.reviewboard.kde.org/r/124515/#comment57400>
no space after '!'
the comment is not really useful since it describes exactly what the code does without adding more information, I would remove it
src/kcharselectdata.cpp (line 594)
<https://git.reviewboard.kde.org/r/124515/#comment57402>
I wonder why this doesn't use uchar rather than the reinterpret cast to quint8, given that data is uchar. In the worst case you'd have to static_cast on the next line, but better static_cast an integral type than reinterpret_cast (or worse, C cast) a pointer type ;)
src/kcharselectdata.cpp (line 595)
<https://git.reviewboard.kde.org/r/124515/#comment57401>
you can use -- :)
- David Faure
On July 28, 2015, 5:56 p.m., Rajeesh K Nambiar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124515/
> -----------------------------------------------------------
>
> (Updated July 28, 2015, 5:56 p.m.)
>
>
> Review request for KDE Frameworks and David Faure.
>
>
> Repository: kwidgetsaddons
>
>
> Description
> -------
>
> 1. Qt4 to Qt5 change introduced QChar::Category enum change (starting from 0 instead of previous value 1). KCharSelectData::category() calculates integer value from binary kcharselect-data and casts to QChar::Category and gets confused, causing non-printable/control characters to be displayed. Fix this.
> 2. Christoph Feck suggests to use QFontMetrics::boundingRect() instead of width() for calculating column width. Fixes the Bengali Virama AU sign being cut on the right side issue observed during testing.
>
>
> Diffs
> -----
>
> src/kcharselect.cpp e988711
> src/kcharselectdata.cpp 5d89470
>
> Diff: https://git.reviewboard.kde.org/r/124515/diff/
>
>
> Testing
> -------
>
> Tested Latin - basic, supplement-1, extended; South Asian - Bengali, Malayalam. Works fine, see screenshots as well.
>
>
> File Attachments
> ----------------
>
> KCharSelect-proper Unicode category
> https://git.reviewboard.kde.org/media/uploaded/files/2015/07/28/62ccf8d8-e442-491b-926e-3e5a4f14b12e__kcharselect-unicode-category.png
>
>
> Thanks,
>
> Rajeesh K Nambiar
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150729/08466d0b/attachment.html>
More information about the Kde-frameworks-devel
mailing list