Commit 3369c502 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port away from deprecated Qt::MidButton

parent 46a27c79
......@@ -2373,7 +2373,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
emit mouseSignal(0, charColumn + 1, charLine + 1 + _scrollBar->value() - _scrollBar->maximum() , 0);
}
}
} else if (ev->button() == Qt::MidButton) {
} else if (ev->button() == Qt::MiddleButton) {
processMidButtonClick(ev);
} else if (ev->button() == Qt::RightButton) {
if (!_usesMouseTracking || ((ev->modifiers() & Qt::ShiftModifier) != 0u)) {
......@@ -2475,7 +2475,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
if ((ev->buttons() & Qt::LeftButton) != 0u) {
button = 0;
}
if ((ev->buttons() & Qt::MidButton) != 0u) {
if ((ev->buttons() & Qt::MiddleButton) != 0u) {
button = 1;
}
if ((ev->buttons() & Qt::RightButton) != 0u) {
......@@ -2514,7 +2514,7 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
}
// don't extend selection while pasting
if ((ev->buttons() & Qt::MidButton) != 0u) {
if ((ev->buttons() & Qt::MiddleButton) != 0u) {
return;
}
......@@ -2724,9 +2724,9 @@ void TerminalDisplay::mouseReleaseEvent(QMouseEvent* ev)
}
if (_usesMouseTracking &&
(ev->button() == Qt::RightButton || ev->button() == Qt::MidButton) &&
(ev->button() == Qt::RightButton || ev->button() == Qt::MiddleButton) &&
!(ev->modifiers() & Qt::ShiftModifier)) {
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);
......@@ -2788,7 +2788,7 @@ void TerminalDisplay::processMidButtonClick(QMouseEvent* ev)
void TerminalDisplay::mouseDoubleClickEvent(QMouseEvent* ev)
{
// Yes, successive middle click can trigger this event
if (ev->button() == Qt::MidButton) {
if (ev->button() == Qt::MiddleButton) {
processMidButtonClick(ev);
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment