Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.8.2
-
-
2a3cd99c5 (dev), 8425f9437 (6.10), 08ec10dcb (6.9), e584529be (tqtc/lts-6.8)
Description
Steps to reproduce
- Build the Simple Example (ActiveQt)
- 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
For Gerrit Dashboard: QTBUG-134098 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
650948,2 | dumpcpp: Don't put Qt types into the type library namespace | dev | qt/qtactiveqt | Status: MERGED | +2 | 0 |
651337,2 | dumpcpp: Don't put Qt types into the type library namespace | 6.10 | qt/qtactiveqt | Status: MERGED | +2 | 0 |
651488,2 | dumpcpp: Don't put Qt types into the type library namespace | 6.9 | qt/qtactiveqt | Status: MERGED | +2 | 0 |
651547,2 | dumpcpp: Don't put Qt types into the type library namespace | tqtc/lts-6.8 | qt/tqtc-qtactiveqt | Status: MERGED | +2 | 0 |