fix QT DEPRECATED VERSION 5.15.2

-Qt::MidButton
This commit is contained in:
Simon De Backer
2020-12-04 18:13:48 +01:00
parent 945b690430
commit ccd76f902d
2 changed files with 14 additions and 11 deletions

View File

@@ -449,7 +449,7 @@ void DiagramView::mousePressEvent(QMouseEvent *e)
if (m_event_interface && m_event_interface->mousePressEvent(e)) return;
//Start drag view when hold the middle button
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
if (e->button() == Qt::MidButton)
#else
#if TODO_LIST
@@ -505,8 +505,8 @@ void DiagramView::mouseMoveEvent(QMouseEvent *e)
setToolTip(tr("(Dev) X: %1 Y: %2").arg(e->pos().x()).arg(e->pos().y()));
if (m_event_interface && m_event_interface->mouseMoveEvent(e)) return;
//Drag the view
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
// Drag the view
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
if (e->buttons() == Qt::MidButton)
#else
#if TODO_LIST
@@ -573,8 +573,8 @@ void DiagramView::mouseReleaseEvent(QMouseEvent *e)
{
if (m_event_interface && m_event_interface->mouseReleaseEvent(e)) return;
//Stop drag view
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
// Stop drag view
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
if (e->button() == Qt::MidButton)
#else
#if TODO_LIST