aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickmenu_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-22 09:32:42 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-22 14:09:13 +0000
commit482ecb0fdc011687eec3df5803653be88f14f539 (patch)
tree101cd8eb1649b5d909b745ee32074a253ad844d4 /src/templates/qquickmenu_p_p.h
parenta33228fd11f1cf8a1fe77d178a171b6b980e32d5 (diff)
Add QQuickPopup::contentItemChange()
Works the same way than QQuickControl::contentItemChange(). This is more efficient and correct (in theory, supports changing the content item at run time) than connecting to the contentItemChanged() signal. Change-Id: I09db809760ddf2c7d62cc2937a6b821f0cd4dad7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickmenu_p_p.h')
-rw-r--r--src/templates/qquickmenu_p_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/templates/qquickmenu_p_p.h b/src/templates/qquickmenu_p_p.h
index e4bdebed..167f865b 100644
--- a/src/templates/qquickmenu_p_p.h
+++ b/src/templates/qquickmenu_p_p.h
@@ -49,6 +49,7 @@
//
#include <QtCore/qvector.h>
+#include <QtCore/qpointer.h>
#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtLabsTemplates/private/qquickpopup_p_p.h>
@@ -78,7 +79,6 @@ public:
void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
void itemGeometryChanged(QQuickItem *, const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void onContentItemChanged();
void onItemPressed();
void onItemActiveFocusChanged();
void onMenuVisibleChanged();
@@ -91,7 +91,7 @@ public:
QVector<QObject *> contentData;
QQmlObjectModel *contentModel;
- QQuickItem *dummyFocusItem;
+ QPointer<QQuickItem> dummyFocusItem;
bool ignoreActiveFocusChanges;
QString title;
};