From 8d473cf9743f1d30a16a27114e93bd5af5648d23 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 18 May 2012 14:03:11 +0200 Subject: Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578) Weekly snapshot --- Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp') diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp index 9f9100a54..648394b6f 100644 --- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp +++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp @@ -283,10 +283,13 @@ void WebPopupMenuProxyQt::createItem(QObject* contextObject) connect(contextObject, SIGNAL(acceptedWithOriginalIndex(int)), SLOT(hidePopupMenu()), Qt::QueuedConnection); connect(contextObject, SIGNAL(rejected()), SLOT(hidePopupMenu()), Qt::QueuedConnection); - QQuickWebViewPrivate::get(m_webView)->setViewInAttachedProperties(m_itemSelector.get()); - component->completeCreate(); - + QQuickWebViewPrivate::get(m_webView)->addAttachedPropertyTo(m_itemSelector.get()); m_itemSelector->setParentItem(m_webView); + + // Only fully create the component once we've set both a parent + // and the needed context and attached properties, so that the + // dialog can do useful stuff in Component.onCompleted(). + component->completeCreate(); } void WebPopupMenuProxyQt::createContext(QQmlComponent* component, QObject* contextObject) -- cgit v1.2.1