Review Request 128034: KateHighlightManger::defaultStyleCount() off by one
Christoph Cullmann
cullmann at kde.org
Sat May 28 14:31:43 UTC 2016
> On May 28, 2016, 12:35 p.m., Kai Uwe Broulik wrote:
> > Afaik you can add enum values as long as you don't cause the other's values to change or cause the compiler to choose a larger underlying type to fit the enum in.
>
> Dominik Haumann wrote:
> Yes, afaik that is correct.
>
> Then my question is: Which is the better fix? Add the dsCount, or add the +1 as in the proposed patch :-)
>
> Albert Astals Cid wrote:
> I'd say this is better, since if you add a dsCount, then if you need to add a new enum what do you do? put it after dsCount and break its meaning? put it before dsCount and break whoever [probably wrongly] was storing int-enum values in a config file?
I think +1 is better, too.
- Christoph
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128034/#review95943
-----------------------------------------------------------
On May 28, 2016, 12:32 p.m., Dominik Haumann wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128034/
> -----------------------------------------------------------
>
> (Updated May 28, 2016, 12:32 p.m.)
>
>
> Review request for Kate and KDE Frameworks.
>
>
> Repository: ktexteditor
>
>
> Description
> -------
>
> The enum dsError should be included in the count, so we need to add 1.
>
> With this patch, we are now able to also change the default style "Error" in the Default styles config page.
>
> A possible other fix would be to add "dsCount" as last enum entry, and then just return KTextEditor::dsCount". Would that be a better solution? (and is adding an enum entry BC?)
>
>
> Diffs
> -----
>
> src/syntax/katesyntaxmanager.cpp 6d4b80e
>
> Diff: https://git.reviewboard.kde.org/r/128034/diff/
>
>
> Testing
> -------
>
> Works, whereas prior to this patch, I was not able to change the color or any other attribute of dsError.
>
>
> Thanks,
>
> Dominik Haumann
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160528/f157a739/attachment.html>
More information about the Kde-frameworks-devel
mailing list