[Bug 263541] science/massxpert: Fails to build with GCC 11: error: 'Qt::MidButton' is deprecated: MidButton is deprecated. Use MiddleButton instead [-Werror=deprecated-declarations]

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 24 Apr 2022 22:06:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263541

            Bug ID: 263541
           Summary: science/massxpert: Fails to build with GCC 11: error:
                    'Qt::MidButton' is deprecated: MidButton is
                    deprecated. Use MiddleButton instead
                    [-Werror=deprecated-declarations]
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: http://package18.nyi.freebsd.org/data/122amd64-default
                    -foo/2021-09-18_18h41m21s/logs/errors/massxpert-3.6.1_
                    1.log
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: salvadore@freebsd.org
            Blocks: 258378

Updating GCC_DEFAULT from GCC 10 to GCC 11 is blocked by the fact that building
this port with GCC 11 gives the following error (full log in URL):

/wrkdirs/usr/ports/science/massxpert/work/massxpert-c229f4a1abde3c20b83a90e50f9c5d79104dfa5f/gui/sequenceEditorGraphicsView.cpp:1936:32:
error: 'Qt::MidButton' is deprecated: MidButton is deprecated. Use MiddleButton
instead [-Werror=deprecated-declarations]
 1936 |     if (event->buttons() & Qt::MidButton)
      |                                ^~~~~~~~~
In file included from /usr/local/include/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/local/include/qt5/QtGui/qwindowdefs.h:44,
                 from /usr/local/include/qt5/QtWidgets/qwidget.h:44,
                 from /usr/local/include/qt5/QtWidgets/qscrollbar.h:44,
                 from /usr/local/include/qt5/QtWidgets/QScrollBar:1,
                 from
/wrkdirs/usr/ports/science/massxpert/work/massxpert-c229f4a1abde3c20b83a90e50f9c5d79104dfa5f/gui/sequenceEditorGraphicsView.cpp:39:
/usr/local/include/qt5/QtCore/qnamespace.h:132:9: note: declared here
  132 |         MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is
deprecated. Use MiddleButton instead") = MiddleButton,
      |         ^~~~~~~~~
cc1plus: all warnings being treated as errors

Also, it should be checked if USE_GCC is still needed and that the default
clang compiler can't be used instead.


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258378
[Bug 258378] [exp-run] Update GCC_DEFAULT from 10 to 11
-- 
You are receiving this mail because:
You are the assignee for the bug.