Commit c022b054 authored by Laurent Montel's avatar Laurent Montel 😁

Using no deprecated enum Qt::MiddleButton

parent 27ad1bbb
Pipeline #32498 passed with stage
in 21 minutes and 26 seconds
......@@ -1847,7 +1847,7 @@ void PageView::keyPressEvent(QKeyEvent *e)
e->accept();
// if performing a selection or dyn zooming, disable keys handling
if ((d->mouseSelecting && e->key() != Qt::Key_Escape) || (QApplication::mouseButtons() & Qt::MidButton))
if ((d->mouseSelecting && e->key() != Qt::Key_Escape) || (QApplication::mouseButtons() & Qt::MiddleButton))
return;
// move/scroll page by using keys
......@@ -1995,7 +1995,7 @@ void PageView::mouseMoveEvent(QMouseEvent *e)
return;
// if holding mouse mid button, perform zoom
if (e->buttons() & Qt::MidButton) {
if (e->buttons() & Qt::MiddleButton) {
int mouseY = e->globalPos().y();
int deltaY = d->mouseMidLastY - mouseY;
......@@ -2139,7 +2139,7 @@ void PageView::mousePressEvent(QMouseEvent *e)
return;
// if performing a selection or dyn zooming, disable mouse press
if (d->mouseSelecting || (e->button() != Qt::MidButton && (e->buttons() & Qt::MidButton)))
if (d->mouseSelecting || (e->button() != Qt::MiddleButton && (e->buttons() & Qt::MiddleButton)))
return;
// if the page is scrolling, stop it
......@@ -2149,7 +2149,7 @@ void PageView::mousePressEvent(QMouseEvent *e)
}
// if pressing mid mouse button while not doing other things, begin 'continuous zoom' mode
if (e->button() == Qt::MidButton) {
if (e->button() == Qt::MiddleButton) {
d->mouseMidLastY = e->globalPos().y();
setCursor(Qt::SizeVerCursor);
return;
......@@ -2362,7 +2362,7 @@ void PageView::mouseReleaseEvent(QMouseEvent *e)
const QPoint eventPos = contentAreaPoint(e->pos());
// handle mode independent mid bottom zoom
if (e->button() == Qt::MidButton) {
if (e->button() == Qt::MiddleButton) {
// request pixmaps since it was disabled during drag
slotRequestVisiblePixmaps();
// the cursor may now be over a link.. update it
......
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