-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.10
-
None
Consider the following code
import QtQuick import bla Item { objectName: Plasmoid.pluginName Plasmoid.contextualActions: [ Item { } ] }
class Applet : public QObject { Q_OBJECT QML_NAMED_ELEMENT(Applet) QML_UNCREATABLE("") Q_PROPERTY(QQmlListProperty<QObject> contextualActions READ qmlContextualActions NOTIFY contextualActionsChanged) Q_PROPERTY(QString pluginName READ pluginName CONSTANT FINAL) public: Applet() { }; QString pluginName() const { return {}; } QML_LIST_PROPERTY_ASSIGN_BEHAVIOR_REPLACE QQmlListProperty<QObject> qmlContextualActions() { return {}; } Q_SIGNAL void contextualActionsChanged(); }; class PlasmoidAttached : public QObject { Q_OBJECT QML_NAMED_ELEMENT(Plasmoid) QML_UNCREATABLE("") QML_ATTACHED(Applet) static Applet *qmlAttachedProperties(QObject *object) { return new Applet; } };
Full project at https://invent.kde.org/nicolasfella/proptest
qmllint warns "Warning: /home/nico/workspace/proptest/Main.qml:9:9: Could not find property "Plasmoid.contextualActions". [missing-property]" but the property exists. The other property, pluginName, is found as expected