Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
plugins/qtermwidget: Use Qt::MiddleButton instead of deprecated Qt::M…
…idButton

Qt::MidButton has been deprecated in QT 5.15 and has been removed from
Qt6. Use Qt::MiddleButton instead.
  • Loading branch information
ptitjano authored and nyalldawson committed Apr 10, 2023
1 parent 76b5c7d commit 7be1774
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugins/grass/qtermwidget/TerminalDisplay.cpp
Expand Up @@ -2016,7 +2016,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
spot->activate(QLatin1String("click-action"));
}
}
else if ( ev->button() == Qt::MidButton )
else if ( ev->button() == Qt::MiddleButton )
{
if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
emitSelection(true,ev->modifiers() & Qt::ControlModifier);
Expand Down Expand Up @@ -2107,7 +2107,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
int button = 3;
if (ev->buttons() & Qt::LeftButton)
button = 0;
if (ev->buttons() & Qt::MidButton)
if (ev->buttons() & Qt::MiddleButton)
button = 1;
if (ev->buttons() & Qt::RightButton)
button = 2;
Expand Down Expand Up @@ -2149,7 +2149,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
if (_actSel == 0) return;

// don't extend selection while pasting
if (ev->buttons() & Qt::MidButton) return;
if (ev->buttons() & Qt::MiddleButton) return;

extendSelection( ev->pos() );
}
Expand Down Expand Up @@ -2404,9 +2404,9 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)

if ( !_mouseMarks &&
((ev->button() == Qt::RightButton && !(ev->modifiers() & Qt::ShiftModifier))
|| ev->button() == Qt::MidButton) )
|| ev->button() == Qt::MiddleButton) )
{
emit mouseSignal( ev->button() == Qt::MidButton ? 1 : 2,
emit mouseSignal( ev->button() == Qt::MiddleButton ? 1 : 2,
charColumn + 1,
charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
2);
Expand Down

0 comments on commit 7be1774

Please sign in to comment.