diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-03-24 07:48:40 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-04 09:03:08 +0000 |
commit | f249c3d30de43e6f0e4f8905f8a4090a912b0a08 (patch) | |
tree | df67d9ca7f3628dfe288621c1a990419347ce0d9 /src/quicktemplates2/qquickmenubar_p.h | |
parent | 5e6b1e2950aa96b53c2fe77185f8d3bf420d27e9 (diff) |
Use Q_PRIVATE_PROPERTY for QQmlListProperty
Hide QQmlListProperty, which is close to unusable in C++, from the
templates C++ API.
Change-Id: I9720fc3297fc625076a8a7553245852b641bc65a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickmenubar_p.h')
-rw-r--r-- | src/quicktemplates2/qquickmenubar_p.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/quicktemplates2/qquickmenubar_p.h b/src/quicktemplates2/qquickmenubar_p.h index 8c703f25..9f03076e 100644 --- a/src/quicktemplates2/qquickmenubar_p.h +++ b/src/quicktemplates2/qquickmenubar_p.h @@ -61,8 +61,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickMenuBar : public QQuickContainer Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL) Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL) - Q_PROPERTY(QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged FINAL) - Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL) + Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QQuickMenu> menus READ menus NOTIFY menusChanged FINAL) + Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty<QObject> contentData READ contentData FINAL) public: explicit QQuickMenuBar(QQuickItem *parent = nullptr); @@ -84,9 +84,6 @@ public: void setContentHeight(qreal height); void resetContentHeight(); - QQmlListProperty<QQuickMenu> menus(); - QQmlListProperty<QObject> contentData(); - Q_SIGNALS: void delegateChanged(); void contentWidthChanged(); |