- 
    Bug 
- 
    Resolution: Unresolved
- 
    P2: Important 
- 
    6.7.0
- 
    None
- 
        2fc45188c (dev)
We have a warning that we cannot fix. It seems it is a bug in qmllint.
I added an example project for this.  QmlDummy.tar.gz 
 
class QmlTestSubProperty : public QObject { Q_OBJECT QML_ELEMENT Q_PROPERTY(bool valid READ isValid CONSTANT) public: [[nodiscard]] bool isValid() const; }; class QmlTest : public QObject { Q_OBJECT QML_ELEMENT QML_SINGLETON Q_PROPERTY(QmlTestSubProperty* appData READ getAppData CONSTANT) QmlTestSubProperty* obj = new QmlTestSubProperty(); public: [[nodiscard]] QmlTestSubProperty* getAppData() const; public: QmlTest(); ~QmlTest(); };
The program works and gives we correct result but qmllint do not like that.
console.log("found property: " + QmlTest.appData.valid)
Warning: /tmp/b/QmlDummy/Main.qml:9:44: Type "QmlTestSubProperty" of property "appData" not found. This is likely due to a missing dependency entry or a type not being exposed declaratively. [unresolved-type] console.log("found property: " + QmlTest.appData.valid) ^^^^^^^
Both components are listed in qmltypes.
Module {
    Component {
        file: "qml.h"
        name: "dummy::QmlTest"
        accessSemantics: "reference"
        prototype: "QObject"
        exports: ["Stuff/QmlTest 254.0"]
        isCreatable: false
        isSingleton: true
        exportMetaObjectRevisions: [65024]
        Property {
            name: "appData"
            type: "QmlTestSubProperty"
            isPointer: true
            read: "getAppData"
            index: 0
            isReadonly: true
            isConstant: true
        }
    }
    Component {
        file: "qml.h"
        name: "dummy::QmlTestSubProperty"
        accessSemantics: "reference"
        prototype: "QObject"
        exports: ["Stuff/QmlTestSubProperty 254.0"]
        exportMetaObjectRevisions: [65024]
        Property {
            name: "valid"
            type: "bool"
            read: "isValid"
            index: 0
            isReadonly: true
            isConstant: true
        }
    }
}
- relates to
- 
                    QTBUG-101141 moc: namespaced base class not properly resolved in cpp.json file -         
- In Review
 
-         
| For Gerrit Dashboard: QTBUG-124294 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 555237,14 | QML: Introduce aliases for builtin types | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |