@@ -32,7 +32,7 @@ class MirSurfaceItem : public QQuickPaintedItem
3232 Q_PROPERTY(State state READ state NOTIFY stateChanged)
3333 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
3434 Q_PROPERTY(MirSurfaceItem* parentSurface READ parentSurface NOTIFY parentSurfaceChanged)
35− Q_PROPERTY(QList<QObject*> childSurfaces READ childSurfaces NOTIFY childSurfacesChanged)
35+ Q_PROPERTY(QQmlListProperty<MirSurfaceItem> childSurfaces READ childSurfaces NOTIFY childSurfacesChanged DESIGNABLE false)
3636
3737public:
3838 enum Type {
@@ -68,7 +68,7 @@ public:
6868 State state() const { return m_state; }
6969 QString name() const { return m_name; }
7070 MirSurfaceItem* parentSurface() const { return m_parentSurface; }
71− QList<QObject*> childSurfaces() const;
71+ void foreachChildSurface(std::function<void(MirSurfaceItem*)> f) const;
7272
7373 void setState(State newState);
7474 void setApplication(ApplicationInfo* item);
@@ -101,6 +101,10 @@ private:
101101 void addChildSurface(MirSurfaceItem* surface);
102102 void removeChildSurface(MirSurfaceItem* surface);
103103
104+ QQmlListProperty<MirSurfaceItem> childSurfaces();
105+ static int childSurfaceCount(QQmlListProperty<MirSurfaceItem> *prop);
106+ static MirSurfaceItem* childSurfaceAt(QQmlListProperty<MirSurfaceItem> *prop, int index);
107+
104108 ApplicationInfo* m_application;
105109 const QString m_name;
106110 const Type m_type;