diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-09-26 11:56:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-09-26 15:53:20 +0200 |
commit | 07d6371f1dc5deef461581ad73c4af5c9f5b9821 (patch) | |
tree | 06bea8c5b7dff1cccdce31d96a66a76d81d63de1 /canvas | |
parent | ed424cf629b2ab33089b1be0dccfce60be85d726 (diff) |
Avoid -Werror=deprecated-declarations
...with qt5-qtbase-devel-5.15.1-1.fc33.x86_64 on Fedora 33:
> ~/lo/core/vcl/qt5/Qt5Widget.cxx: In member function ‘virtual void Qt5Widget::wheelEvent(QWheelEvent*)’:
> ~/lo/core/vcl/qt5/Qt5Widget.cxx:144:59: error: ‘QPoint QWheelEvent::pos() const’ is deprecated: Use position() [-Werror=deprecated-declarations]
> 144 | fillSalAbstractMouseEvent(rFrame, pEvent, pEvent->pos(), pEvent->buttons(), nWidth, aEvent)
> | ^
> ~/lo/core/vcl/qt5/Qt5Widget.cxx:196:5: note: in expansion of macro ‘FILL_SAME’
> 196 | FILL_SAME(m_rFrame, width());
> | ^~~~~~~~~
> In file included from /usr/include/qt5/QtGui/QFocusEvent:1,
> from ~/lo/core/vcl/qt5/Qt5Widget.cxx:32:
> /usr/include/qt5/QtGui/qevent.h:225:19: note: declared here
> 225 | inline QPoint pos() const { return p.toPoint(); }
> | ^~~
But for one the types used by the other calls of the FILL_SAME macro do not have
a position member function, so stop using the macro and spell it out explicitly
here. And for another, QWheelEvent::position returns a QPointF instead of a
QPoint, so need to convert that with toPoint. And for a third,
QWheelEvent::position is only available since Qt 5.14 according to
<https://doc.qt.io/qt-5/qwheelevent.html#position>.
Change-Id: I6e64fc9717a9f5a85303f070c6a1b66ed21ec458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103475
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas')
0 files changed, 0 insertions, 0 deletions