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

moc code generates warning [-Wredundant-parens]

    XMLWordPrintable

Details

    • Windows
    • 8079361852 (qt/qtbase/dev) 8079361852 (qt/tqtc-qtbase/dev) 0c59d22c57 (qt/qtbase/6.2) 71cabb4a21 (qt/qtbase/6.3) 0c59d22c57 (qt/tqtc-qtbase/6.2) 71cabb4a21 (qt/tqtc-qtbase/6.3) 0c59d22c57 (qt/tqtc-qtbase/6.2.4)

    Description

      Using clang-cl (13.0.1) with VS 2022 17.1 generates the following warning in moc generated code: (hopefully the alignment is correct the error is at QVariant( * ) )

       

      [build] E:\src\AllProjects\build\ninja\debug\testing-grounds\tg-qt-advanced-plotting_autogen\include\moc_qadv_propertybrowser.cpp(83,108): warning: redundant parentheses surrounding declarator [-Wredundant-parens] 
      [build]         case 0: _t->setValue((*reinterpret_cast< QtProperty*(*)>(_a[1])),(*reinterpret_cast< const QVariant(*)>(_a[2]))); break; [build]                                                                                                            ^~~

      the slot is defined as:

          Q_SLOT void setValue(QtProperty *property, const QVariant &val) override;

       

      Attachments

        For Gerrit Dashboard: QTBUG-100915
        # Subject Branch Project Status CR V

        Activity

          People

            fabiankosmale Fabian Kosmale
            neumann-a Alexander Neumann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes