Skip to content

Commit 7be1774

Browse files
ptitjanonyalldawson
authored andcommittedApr 10, 2023
plugins/qtermwidget: Use Qt::MiddleButton instead of deprecated Qt::MidButton
Qt::MidButton has been deprecated in QT 5.15 and has been removed from Qt6. Use Qt::MiddleButton instead.
1 parent 76b5c7d commit 7be1774

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎src/plugins/grass/qtermwidget/TerminalDisplay.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
20162016
spot->activate(QLatin1String("click-action"));
20172017
}
20182018
}
2019-
else if ( ev->button() == Qt::MidButton )
2019+
else if ( ev->button() == Qt::MiddleButton )
20202020
{
20212021
if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
20222022
emitSelection(true,ev->modifiers() & Qt::ControlModifier);
@@ -2107,7 +2107,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
21072107
int button = 3;
21082108
if (ev->buttons() & Qt::LeftButton)
21092109
button = 0;
2110-
if (ev->buttons() & Qt::MidButton)
2110+
if (ev->buttons() & Qt::MiddleButton)
21112111
button = 1;
21122112
if (ev->buttons() & Qt::RightButton)
21132113
button = 2;
@@ -2149,7 +2149,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
21492149
if (_actSel == 0) return;
21502150

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

21542154
extendSelection( ev->pos() );
21552155
}
@@ -2404,9 +2404,9 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
24042404

24052405
if ( !_mouseMarks &&
24062406
((ev->button() == Qt::RightButton && !(ev->modifiers() & Qt::ShiftModifier))
2407-
|| ev->button() == Qt::MidButton) )
2407+
|| ev->button() == Qt::MiddleButton) )
24082408
{
2409-
emit mouseSignal( ev->button() == Qt::MidButton ? 1 : 2,
2409+
emit mouseSignal( ev->button() == Qt::MiddleButton ? 1 : 2,
24102410
charColumn + 1,
24112411
charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
24122412
2);

0 commit comments

Comments
 (0)