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

dumpcpp puts native Qt types inside a custom namespace

    XMLWordPrintable

Details

    • Windows

    Description

      Steps to reproduce

      1. Build the Simple Example (ActiveQt)
      2. From the Command Prompt, run `dumpcpp simpleax.exe`

       

      Outcomes
      The generated C++ code is broken, as Qt types are forward-declared as external types inside the custom namespace:

      namespace simpleaxLib {
      // ...
      
          struct QRect;
          struct QSize;
          struct QPoint;
      
      // ...
      
      inline QRect IQSimpleAX::normalGeometry() const // ERROR: Incomplete result type 'QRect' in function definition
      {
          QVariant qax_result = property("normalGeometry");
          return *reinterpret_cast<QRect*>(qax_result.data());
      }
      
      // ...
      
      inline void IQSimpleAXEvents::customContextMenuRequested(simpleaxLib::QPoint p_pos)
      {
          void *_a[] = {0, (void*)&p_pos};
          qt_metacall(QMetaObject::InvokeMetaMethod, 7, _a);
      }
      
      //...
      }
      

       

      Use-case
      One party produced an SDK based on ActiveQt (and only the COM interface is available, not the native C++ headers and libraries). Another party is trying to use that SDK from a Qt-based application.

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes