D5037: KTextEditor: prevent accidental zooming

Dominik Haumann noreply at phabricator.kde.org
Sat Mar 18 20:50:07 UTC 2017


dhaumann added a comment.


  Yes, this is what I meant. I think the code is now better by using an isolated class.
  
  I just read the code again, and I think I would like to suggest another change: The class name currently is too generic, this makes reasoning quite hard.
  That said, I suggest:
  
  - to rename WheelEventFilter to ZoomEventFilter
  - to rename m_accidentalModifier to m_ignoreZoom
  - remove the "bool skip = false" variable, and instead just check m_ignoreZoom instead
  
  Maybe the naming can be improved even more. I will test this patch, but will not have time until Thursday.

INLINE COMMENTS

> kateviewinternal.cpp:105
> +                skip = true;
> +                // unset the ControlModifier so the view scrollbars can handle the scroll
> +                // event and produce normal, not accelerated scrolling

The comment talks about "ControlModifier", but the parameter allows also other modifies.

REVISION DETAIL
  https://phabricator.kde.org/D5037

To: rjvbb, #ktexteditor
Cc: luebking, anthonyfieroni, dhaumann, kwrite-devel, #ktexteditor, #frameworks, head7, cullmann, kfunk, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170318/407f0eb4/attachment.html>


More information about the Kde-frameworks-devel mailing list