QmlDesigner: Use NodeHints in navigator

Change-Id: I90cffc6d814c06d2474b003a4b6c5714b1a9ad1c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-01-24 16:45:25 +01:00
parent 85ce230e56
commit 4fb9bd12cb

View File

@@ -27,6 +27,7 @@
#include <bindingproperty.h>
#include <nodeabstractproperty.h>
#include <nodehints.h>
#include <nodelistproperty.h>
#include <nodeproperty.h>
#include <variantproperty.h>
@@ -763,6 +764,10 @@ void NavigatorTreeModel::handleItemLibraryItemDrop(const QMimeData *mimeData, in
if (foundTarget) {
ItemLibraryEntry itemLibraryEntry = itemLibraryEntryFromData(mimeData->data(QLatin1String("application/vnd.bauhaus.itemlibraryinfo")));
if (!NodeHints::fromItemLibraryEntry(itemLibraryEntry).canBeDroppedInNavigator())
return;
QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNode(m_view, itemLibraryEntry, QPointF(), targetProperty);
if (newQmlItemNode.isValid() && targetProperty.isNodeListProperty()) {