changeset 30004:2c40f84bfe10

replace all uses of deprecated Qt::MidButton symbol with Qt::MiddleButton Files: Canvas.cc, QtHandlesUtils.cc, TerminalView.cpp, and tab-bar.cc.
author John W. Eaton <jwe@octave.org>
date Wed, 18 Aug 2021 13:49:06 -0400
parents 66763afc32c9
children 7677b6184c0b
files libgui/graphics/Canvas.cc libgui/graphics/QtHandlesUtils.cc libgui/qterminal/libqterminal/unix/TerminalView.cpp libgui/src/tab-bar.cc
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc	Wed Aug 18 13:26:14 2021 -0400
+++ b/libgui/graphics/Canvas.cc	Wed Aug 18 13:49:06 2021 -0400
@@ -556,7 +556,7 @@
         retval = 1;
         break;
 
-      case Qt::MidButton:
+      case Qt::MiddleButton:
         retval = 2;
         break;
 
@@ -738,7 +738,7 @@
 
                         break;
 
-                      case Qt::MidButton:
+                      case Qt::MiddleButton:
                         {
                           axes::properties& ap =
                             Utils::properties<axes> (axesObj);
--- a/libgui/graphics/QtHandlesUtils.cc	Wed Aug 18 13:26:14 2021 -0400
+++ b/libgui/graphics/QtHandlesUtils.cc	Wed Aug 18 13:49:06 2021 -0400
@@ -187,7 +187,7 @@
                 return "normal";
               else if (buttons == Qt::RightButton)
                 return "alt";
-              else if (buttons == Qt::MidButton
+              else if (buttons == Qt::MiddleButton
                        || buttons == (Qt::LeftButton | Qt::RightButton))
                 return "extend";
             }
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Wed Aug 18 13:26:14 2021 -0400
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Wed Aug 18 13:49:06 2021 -0400
@@ -1516,7 +1516,7 @@
             }
         }
     }
-  else if ( ev->button() == Qt::MidButton )
+  else if ( ev->button() == Qt::MiddleButton )
     {
       if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
         emitSelection(true,ev->modifiers() & Qt::ControlModifier);
@@ -1601,7 +1601,7 @@
       int button = 3;
       if (ev->buttons() & Qt::LeftButton)
         button = 0;
-      if (ev->buttons() & Qt::MidButton)
+      if (ev->buttons() & Qt::MiddleButton)
         button = 1;
       if (ev->buttons() & Qt::RightButton)
         button = 2;
@@ -1642,7 +1642,7 @@
   if (_actSel == 0) return;
 
   // don't extend selection while pasting
-  if (ev->buttons() & Qt::MidButton) return;
+  if (ev->buttons() & Qt::MiddleButton) return;
 
   extendSelection( ev->pos() );
 }
@@ -1909,7 +1909,7 @@
 
   if ( !_mouseMarks &&
        ((ev->button() == Qt::RightButton && !(ev->modifiers() & Qt::ShiftModifier))
-        || ev->button() == Qt::MidButton) )
+        || ev->button() == Qt::MiddleButton) )
     {
       emit mouseSignal( 3,
                         charColumn + 1,
--- a/libgui/src/tab-bar.cc	Wed Aug 18 13:26:14 2021 -0400
+++ b/libgui/src/tab-bar.cc	Wed Aug 18 13:49:06 2021 -0400
@@ -201,7 +201,7 @@
         if ((me->type () == QEvent::MouseButtonDblClick
              && me->button() == Qt::LeftButton)
             || (me->type () != QEvent::MouseButtonDblClick
-                && me->button() == Qt::MidButton))
+                && me->button() == Qt::MiddleButton))
           {
             // Middle click or double click -> close the tab
             // Make the clicked tab the current one and close it