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

Port away from deprecated Qt::MidButton

parent e29668a2
Pipeline #32526 passed with stage
in 17 minutes and 28 seconds
......@@ -90,7 +90,7 @@ ColorWheelItem::ColorWheelItem(QQuickItem *parent)
, m_defaultValue(1)
, m_zeroShift(0)
{
setAcceptedMouseButtons(Qt::LeftButton | Qt::MidButton);
setAcceptedMouseButtons(Qt::LeftButton | Qt::MiddleButton);
setAcceptHoverEvents(true);
}
......
......@@ -431,7 +431,7 @@ void CustomLabel::mousePressEvent(QMouseEvent *e)
if (e->button() == Qt::LeftButton) {
m_dragStartPosition = m_dragLastPosition = e->pos();
e->accept();
} else if (e->button() == Qt::MidButton) {
} else if (e->button() == Qt::MiddleButton) {
emit resetValue();
m_dragStartPosition = QPoint(-1, -1);
} else {
......@@ -487,7 +487,7 @@ void CustomLabel::mouseMoveEvent(QMouseEvent *e)
void CustomLabel::mouseReleaseEvent(QMouseEvent *e)
{
if (e->button() == Qt::MidButton) {
if (e->button() == Qt::MiddleButton) {
e->accept();
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