aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-06-08 09:21:58 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-06-11 22:00:19 +0200
commit212c2bffbb041aee0e3c9a7f0551ef151ed2d3ad (patch)
treea9e5265252c2ccfead34d4e42fe8149358bff0f1 /tools
parent974c8da34d79cd8fc417ff5d69bc00c1e910e5ac (diff)
Replace calls to deprecated QEvent accessor functions
Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qtdeclarative $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: I1be5819506fd5039e86b4494223acbe193e6b0c9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmleasing/splineeditor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp
index c1afbbb441..1426a1e107 100644
--- a/tools/qmleasing/splineeditor.cpp
+++ b/tools/qmleasing/splineeditor.cpp
@@ -206,12 +206,12 @@ void SplineEditor::paintEvent(QPaintEvent *)
void SplineEditor::mousePressEvent(QMouseEvent *e)
{
if (e->button() == Qt::LeftButton) {
- m_activeControlPoint = findControlPoint(e->pos());
+ m_activeControlPoint = findControlPoint(e->position().toPoint());
if (m_activeControlPoint != -1) {
mouseMoveEvent(e);
}
- m_mousePress = e->pos();
+ m_mousePress = e->position().toPoint();
e->accept();
}
}
@@ -612,10 +612,10 @@ QPointF limitToCanvas(const QPointF point)
void SplineEditor::mouseMoveEvent(QMouseEvent *e)
{
// If we've moved more then 25 pixels, assume user is dragging
- if (!m_mouseDrag && QPoint(m_mousePress - e->pos()).manhattanLength() > qApp->startDragDistance())
+ if (!m_mouseDrag && QPoint(m_mousePress - e->position().toPoint()).manhattanLength() > qApp->startDragDistance())
m_mouseDrag = true;
- QPointF p = mapFromCanvas(e->pos());
+ QPointF p = mapFromCanvas(e->position().toPoint());
if (m_mouseDrag && m_activeControlPoint >= 0 && m_activeControlPoint < m_controlPoints.size()) {
p = limitToCanvas(p);