D5490: Only follow mouse when moved (Fixes Bug #372635)

David Edmundson noreply at phabricator.kde.org
Tue Apr 25 10:15:56 UTC 2017

davidedmundson added a comment.

  Cool, seems like a solid approach.
  Just nitpicks left.


> mousehelper.h:41-42
> +
> +    Q_INVOKABLE QPointF globalMousePosition() const;
> +    Q_INVOKABLE void setGlobalMousePosition(const QPointF &pos);
> +};

You don't need these to be invokable if you're exposing them as a property.

Right now you're exporting two things with the same name, the value of a property and a function.

> qmlplugins.cpp:41
>      qmlRegisterType<Milou::DragHelper> (uri, 0, 2, "DragHelper");
> +    qmlRegisterType<Milou::MouseHelper> (uri, 0, 1, "MouseHelper");
>  }

May as well register a singleton, it doesn't have a state.

Instead of having one object created per delegate, we just one have object.

  R112 Milou


To: leszeklesner, broulik
Cc: ltoscano, qi437103, lfurmetz, anthonyfieroni, davidedmundson, plasma-devel, spstarr, progwolff, Zren, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170425/0d7bacd4/attachment-0001.html>

More information about the Plasma-devel mailing list