Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93810

warnings due to enums in QSize

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.8, 6.3.0 Alpha
    • 5.15.2
    • None
    • Linux e5-2620v2 5.12.3-arch1-1 #1 SMP PREEMPT Wed, 12 May 2021 17:54:18 +0000 x86_64 GNU/Linux
    • Linux/X11
    • ab1904363a87656b4ddec77ee9978082a25dadcd (qt/qtbase/dev) 9e3c28ad8352f6ac7104436138414bd7a9052530 (qt/qtbase/6.2) 135ff4f78b179a69f36e548dab787dfbafa317f8 (qt/tqtc-qtbase/5.15)

    Description

      When compiling this, I get these warnings:

      In file included from /usr/include/qt/QtWidgets/qwidget.h:52, 
                       from /usr/include/qt/QtWidgets/QWidget:1, 
                       from CairoWidget.hpp:5, 
                       from CairoWidget.cpp:5: 
      /usr/include/qt/QtWidgets/qsizepolicy.h: In member function 'constexpr Qt::Orientations QSizePolicy::expandingDirections() const': 
      /usr/include/qt/QtWidgets/qsizepolicy.h:137:38: warning: bitwise operation between different enumeration types 'QSizePolicy::Policy' and 'QSizePolicy::PolicyFlag' is deprecated [-Wdeprecated-enum-enum-conversion
      ] 
        137 |         return ( (verticalPolicy()   & ExpandFlag) ? Qt::Vertical   : Qt::Orientations() ) 
            |                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ 
      /usr/include/qt/QtWidgets/qsizepolicy.h:138:38: warning: bitwise operation between different enumeration types 'QSizePolicy::Policy' and 'QSizePolicy::PolicyFlag' is deprecated [-Wdeprecated-enum-enum-conversion
      ] 
        138 |              | ( (horizontalPolicy() & ExpandFlag) ? Qt::Horizontal : Qt::Orientations() ) ; 
            |                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ 
      In file included from /usr/include/qt/QtWidgets/qwidget.h:52, 
                       from /usr/include/qt/QtWidgets/QWidget:1, 
                       from CairoWidget.hpp:5, 
                       from example3.cpp:5: 
      /usr/include/qt/QtWidgets/qsizepolicy.h: In member function 'constexpr Qt::Orientations QSizePolicy::expandingDirections() const': 
      /usr/include/qt/QtWidgets/qsizepolicy.h:137:38: warning: bitwise operation between different enumeration types 'QSizePolicy::Policy' and 'QSizePolicy::PolicyFlag' is deprecated [-Wdeprecated-enum-enum-conversion
      ] 
        137 |         return ( (verticalPolicy()   & ExpandFlag) ? Qt::Vertical   : Qt::Orientations() ) 
            |                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ 
      /usr/include/qt/QtWidgets/qsizepolicy.h:138:38: warning: bitwise operation between different enumeration types 'QSizePolicy::Policy' and 'QSizePolicy::PolicyFlag' is deprecated [-Wdeprecated-enum-enum-conversion
      ] 
        138 |              | ( (horizontalPolicy() & ExpandFlag) ? Qt::Horizontal : Qt::Orientations() ) ; 
            |                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
       
      

      I am using gcc-11.1.0.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              janezzabc Janez Žemva
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes