From f249c3d30de43e6f0e4f8905f8a4090a912b0a08 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 24 Mar 2018 07:48:40 +0100 Subject: 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 --- src/quicktemplates2/qquickpopup.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/quicktemplates2/qquickpopup.cpp') diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index 03dd3dd0..f7baae9b 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -1718,13 +1718,12 @@ void QQuickPopup::setContentItem(QQuickItem *item) \sa Item::data, contentChildren */ -QQmlListProperty QQuickPopup::contentData() +QQmlListProperty QQuickPopupPrivate::contentData() { - Q_D(QQuickPopup); - QQuickControlPrivate *p = QQuickControlPrivate::get(d->popupItem); + QQuickControlPrivate *p = QQuickControlPrivate::get(popupItem); if (!p->contentItem) p->executeContentItem(); - return QQmlListProperty(d->popupItem->contentItem(), nullptr, + return QQmlListProperty(popupItem->contentItem(), nullptr, QQuickItemPrivate::data_append, QQuickItemPrivate::data_count, QQuickItemPrivate::data_at, @@ -1744,10 +1743,9 @@ QQmlListProperty QQuickPopup::contentData() \sa Item::children, contentData */ -QQmlListProperty QQuickPopup::contentChildren() +QQmlListProperty QQuickPopupPrivate::contentChildren() { - Q_D(QQuickPopup); - return QQmlListProperty(d->popupItem->contentItem(), nullptr, + return QQmlListProperty(popupItem->contentItem(), nullptr, QQuickItemPrivate::children_append, QQuickItemPrivate::children_count, QQuickItemPrivate::children_at, -- cgit v1.2.3