D5037: KTextEditor: prevent accidental zooming

Kevin Funk noreply at phabricator.kde.org
Thu Jun 22 09:05:02 UTC 2017


kfunk added a comment.


  A couple of minor issues I spotted while looking briefly over the patch.

INLINE COMMENTS

> kateviewinternal.cpp:76
> +
> +    bool detectZoomingEvent(QWheelEvent *e, Qt::KeyboardModifiers modifier=Qt::ControlModifier)
> +    {

Style: Use ` = `

> kateviewinternal.cpp:85
> +                if (m_lastWheelEventUnmodified && deltaT < 200) {
> +                        m_ignoreZoom = true;
> +                }

Style: Indent off

> kateviewinternal.cpp:87
> +                }
> +                else {
> +                    // the protection is kept active for 1s after the last wheel event

Simplify: `else if (...) {`?

> kateviewinternal.cpp:121
> +    QElapsedTimer m_lastWheelEvent;
> +    bool m_ignoreZoom;
> +    bool m_lastWheelEventUnmodified;

Initialize here

> kateviewinternal.cpp:122
> +    bool m_ignoreZoom;
> +    bool m_lastWheelEventUnmodified;
> +};

Dito

REPOSITORY
  R39 KTextEditor

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

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


More information about the Kde-frameworks-devel mailing list