summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-30 13:43:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-30 16:46:51 +0100
commit796f9fee85094244a3afb6f369b031599c350ca3 (patch)
tree60b7bc2f0400fb68b510c4da11ae38694f7d38e8
parente5022a5e5225dca593e0d00ec1eaab903c5065ea (diff)
-Werror,-Wdeprecated-declarations: Qt::MidButton -> Qt::MiddleButton
My qt5-qtbase-devel-5.15.2-2.fc33.x86_64 /usr/include/qt5/QtCore/qnamespace.h states > #if QT_DEPRECATED_SINCE(5, 15) // commented as such since 4.7.0 > MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is deprecated. Use MiddleButton instead") = MiddleButton, > #endif so lets assume that the MiddleButton replacement is available since at least Qt 4.7.0 and use it unconditionally here. (Both occurrences had been introduced with 1426437be0530a8ba5749c7e76c5ce0e9053af2f "QT5 implement some mouse handling".) Change-Id: I1db088407a4974b64ef90da75e3c13ede7647422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106862 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
-rw-r--r--vcl/qt5/Qt5Tools.cxx2
-rw-r--r--vcl/qt5/Qt5Widget.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Tools.cxx b/vcl/qt5/Qt5Tools.cxx
index 667a5af6b8ef..6642c66af0cf 100644
--- a/vcl/qt5/Qt5Tools.cxx
+++ b/vcl/qt5/Qt5Tools.cxx
@@ -49,7 +49,7 @@ sal_uInt16 GetMouseModCode(Qt::MouseButtons eButtons)
sal_uInt16 nCode = 0;
if (eButtons & Qt::LeftButton)
nCode |= MOUSE_LEFT;
- if (eButtons & Qt::MidButton)
+ if (eButtons & Qt::MiddleButton)
nCode |= MOUSE_MIDDLE;
if (eButtons & Qt::RightButton)
nCode |= MOUSE_RIGHT;
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 40500585e1fe..68742b07c51e 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -154,7 +154,7 @@ void Qt5Widget::handleMouseButtonEvent(const Qt5Frame& rFrame, const QMouseEvent
case Qt::LeftButton:
aEvent.mnButton = MOUSE_LEFT;
break;
- case Qt::MidButton:
+ case Qt::MiddleButton:
aEvent.mnButton = MOUSE_MIDDLE;
break;
case Qt::RightButton: