Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.3, 6.8.0
-
None
-
-
de1101c3a (dev), 87a3058e7 (6.8)
Description
There are C++ compilation errors when building a QML component with aliased attached property.
Sample code:
import QtQuick import QtQuick.Templates as T T.Popup { T.Overlay.modal: Rectangle { color: 'grey' } }
QML type compiler generates code
... QQuickOverlayAttached * m_T.Overlay = nullptr; ...
Which naturally produces compilation errors:
.qmltc\test\mypopup.h(123): error C3551: if a trailing return type is used then the leading return type shall be the single type-specifier 'auto' (not 'overloaded function type') .qmltc\test\mypopup.h(123): error C3484: syntax error: expected '->' before the return type .qmltc\test\mypopup.h(123): error C3613: missing return type after '->' ('int' assumed) .qmltc\test\mypopup.h(123): error C3646: 'Overlay': unknown override specifier
See standalone example test.zip
Attachments
Issue Links
- relates to
-
QTBUG-130839 [qmltc] Customizing Overlay.modal attached property causes compilation errors
-
- Closed
-
For Gerrit Dashboard: QTBUG-130838 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
602871,2 | qmltc: Fix usage of namespaced attached types | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
603138,2 | qmltc: Fix usage of namespaced attached types | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |