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; if (m_event_interface && m_event_interface->mousePressEvent(e)) return;
//Start drag view when hold the middle button //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) if (e->button() == Qt::MidButton)
#else #else
#if TODO_LIST #if TODO_LIST
@@ -506,7 +506,7 @@ void DiagramView::mouseMoveEvent(QMouseEvent *e)
if (m_event_interface && m_event_interface->mouseMoveEvent(e)) return; if (m_event_interface && m_event_interface->mouseMoveEvent(e)) return;
// Drag the view // Drag the view
#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->buttons() == Qt::MidButton) if (e->buttons() == Qt::MidButton)
#else #else
#if TODO_LIST #if TODO_LIST
@@ -574,7 +574,7 @@ void DiagramView::mouseReleaseEvent(QMouseEvent *e)
if (m_event_interface && m_event_interface->mouseReleaseEvent(e)) return; if (m_event_interface && m_event_interface->mouseReleaseEvent(e)) return;
// Stop drag view // Stop drag view
#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) if (e->button() == Qt::MidButton)
#else #else
#if TODO_LIST #if TODO_LIST

View File

@@ -372,8 +372,9 @@ ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) {
du milieu de la souris. du milieu de la souris.
@param e QMouseEvent decrivant l'evenement souris @param e QMouseEvent decrivant l'evenement souris
*/ */
void ElementView::mousePressEvent(QMouseEvent *e) { void ElementView::mousePressEvent(QMouseEvent* e)
#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) if (e->button() == Qt::MidButton)
#else #else
#if TODO_LIST #if TODO_LIST
@@ -393,8 +394,9 @@ void ElementView::mousePressEvent(QMouseEvent *e) {
@brief ElementView::mouseMoveEvent @brief ElementView::mouseMoveEvent
Manage the event move mouse Manage the event move mouse
*/ */
void ElementView::mouseMoveEvent(QMouseEvent *e) { void ElementView::mouseMoveEvent(QMouseEvent* e)
#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->buttons() == Qt::MidButton) if (e->buttons() == Qt::MidButton)
#else #else
#if TODO_LIST #if TODO_LIST
@@ -418,8 +420,9 @@ void ElementView::mouseMoveEvent(QMouseEvent *e) {
@brief ElementView::mouseReleaseEvent @brief ElementView::mouseReleaseEvent
Manage event release click mouse Manage event release click mouse
*/ */
void ElementView::mouseReleaseEvent(QMouseEvent *e) { void ElementView::mouseReleaseEvent(QMouseEvent* e)
#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) if (e->button() == Qt::MidButton)
#else #else
#if TODO_LIST #if TODO_LIST