Review Request 127061: duchain: builder: display offsets in bytes
Milian Wolff
mail at milianw.de
Sun Feb 14 10:36:30 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127061/#review92338
-----------------------------------------------------------
Fix it, then Ship it!
Yes, I had that on my todo for a long time. Is your format `"Bytes:Bits"` common? I've never seen it, but I don't often have to play around with bits ;-)
languages/clang/duchain/builder.cpp (line 977)
<https://git.reviewboard.kde.org/r/127061/#comment62981>
I'd pull this out into its own line(s) for readability
auto offsetString = QString::number(offset / 8);
if (auto rest = offset % 8) {
offsetString += QLatin1Char(':') + QString::number(rest);
}
and then just replace offset with offsetString in the old i18n call.
- Milian Wolff
On Feb. 13, 2016, 6:25 a.m., Alexandre Courbot wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127061/
> -----------------------------------------------------------
>
> (Updated Feb. 13, 2016, 6:25 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdevelop
>
>
> Description
> -------
>
> Having the offsets of members in a structure displayed is extremely
> useful for people who work with data structures. However the unit
> chosen (bits) is not really common. This patch changes it to bytes. If
> an offset doesn't round to a byte position, the extra bits are also
> displayed.
>
>
> Diffs
> -----
>
> languages/clang/duchain/builder.cpp 22d00f0fbbbcbce2eab92df2d9ed2b33e237a9e2
>
> Diff: https://git.reviewboard.kde.org/r/127061/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Alexandre Courbot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160214/6073e84a/attachment.html>
More information about the KDevelop-devel
mailing list