Port away from deprecated Qt::MidButton

GIT_SILENT
parent 44e5114c
Pipeline #32502 failed with stage
in 60 minutes and 19 seconds
......@@ -93,7 +93,7 @@ public:
return QTabBar::event(ev);
}
void mousePressEvent(QMouseEvent* event) override {
if (event->button() == Qt::MidButton) {
if (event->button() == Qt::MiddleButton) {
// just close on midbutton, drag can still be done with left mouse button
int tab = tabAt(event->pos());
......@@ -116,7 +116,7 @@ public:
if (event->type() == QEvent::MouseButtonDblClick) {
// block tabBarDoubleClicked signals with RMB, see https://bugs.kde.org/show_bug.cgi?id=356016
auto mouseEvent = static_cast<const QMouseEvent*>(event);
if (mouseEvent->button() == Qt::MidButton) {
if (mouseEvent->button() == Qt::MiddleButton) {
return true;
}
}
......
......@@ -364,7 +364,7 @@ bool Controller::eventFilter(QObject *obj, QEvent *ev)
if (ev->type() == QEvent::MouseButtonPress || ev->type() == QEvent::MouseButtonDblClick)
{
auto* mev = static_cast<QMouseEvent*>(ev);
int activationButtonMask = Qt::LeftButton | Qt::MidButton | Qt::RightButton;
int activationButtonMask = Qt::LeftButton | Qt::MiddleButton | Qt::RightButton;
if ((mev->button() & activationButtonMask) == 0)
return false;
}
......
......@@ -105,7 +105,7 @@ void KDevDocumentView::mousePressEvent( QMouseEvent * event )
if (event->modifiers() == Qt::NoModifier) {
const bool actionOpen = event->button() == Qt::LeftButton;
const bool actionClose = event->button() == Qt::MidButton;
const bool actionClose = event->button() == Qt::MiddleButton;
const bool action = actionOpen || actionClose;
if (action) {
......
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