vcl/qt5/Qt5Tools.cxx  |    2 +-
 vcl/qt5/Qt5Widget.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 206b17e84276768ccef0344e1a9380ff84440e4a
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Mon Nov 30 13:43:18 2020 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Fri Mar 28 13:38:54 2025 +0100

    -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 <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 796f9fee85094244a3afb6f369b031599c350ca3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183437
    Reviewed-by: Stephan Bergmann <[email protected]>
    Tested-by: allotropia jenkins <[email protected]>

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 ca4bef0ffbfe..7569c89783f8 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -129,7 +129,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:

Reply via email to