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

enum-enum warning in qxcbwindow.cpp is genuiune

    XMLWordPrintable

Details

    • cfc2e267a4 (qt/qtbase/dev) cfc2e267a4 (qt/tqtc-qtbase/dev) 42c242f5fc (qt/qtbase/6.2) 42c242f5fc (qt/tqtc-qtbase/6.2) dd974c68ee (qt/qtbase/6.3) dd974c68ee (qt/tqtc-qtbase/6.3) de28284547 (qt/tqtc-qtbase/5.15) dd974c68ee (qt/tqtc-qtbase/6.3.0)

    Description

      C++20 deprecated arithmetic between enums. QFlags<> overrides that with its operators, but not for enums of different types.

      This leads to a deprecation warning in qxcbwindow.cpp:

      src/plugins/platforms/xcb/qxcbwindow.cpp:1597:53: warning: bitwise operation between different enumeration types ('Qt::WindowType' and 'QNativeInterface::Private::QXcbWindow::WindowType') is deprecated [-Wdeprecated-enum-enum-conversion]
          if ((flags & Qt::FramelessWindowHint) && !(type & WindowType::KdeOverride)) {
                                                     ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
      

      This appears to be a genuine bug, because 0x4000 (QXcbWindow::WindowType::KdeOverride) is WindowMinimizeButtonHint in decltype(type) = Qt::WindowType.

      Unfortunately, it's not obvious to me how to fix it.

      Attachments

        Issue Links

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

          Activity

            People

              liaqi Liang Qi
              mmutz Marc Mutz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes