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

Signal requires debug output operator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 6.9.0 Beta2
    • 6.9.0 Beta1
    • Core: Other
    • None

    Description

      Following code compiles fine Qt 5 & Qt 6.8.1, but not anymore with Qt 6.9.0 Beta1

      test.cpp:

      #include <QApplication>
      #include <QObject>
      
      #include <set>
      
      struct MyItem
      {
        int value;
      };
      
      class MyClass : public QObject
      {
        Q_OBJECT
      signals:
        void itemsChanged(const std::set<MyItem>& items);
      };
      
      #include "test.moc" // only necessary as we have a single file here
      
      int main(int argc, char* argv[])
      {
        QApplication app(argc, argv);
      
        MyClass myClass;
      
        return QApplication::exec();
      }
      

      This results in a C2679 warning:

      binary '<<': no operator found which takes a right-hand operand of type 'const MyItem' (or there is no acceptable conversion) C:\dev\dependencies\Qt\6.9.0\msvc2022_64\include\QtCore\qdebug.h
      

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              EliteScience Heiko Thiel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes