Commit 2e1c1df7 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.ItemNode: remove check for QtQuick imports



The Qt Quick Designer requires a Qt Quick import, so we
do not have to check for this case anymore.

Change-Id: Icbfa8fcf97eb43a503405e508e4afe1a16cc1542
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 626364f6
......@@ -181,25 +181,6 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary
return newQmlItemNode;
}
static void checkImageImport(AbstractView *view)
{
const QString newImportUrl = QLatin1String("QtQuick");
const QString newImportVersion = QLatin1String("1.1");
Import newImport = Import::createLibraryImport(newImportUrl, newImportVersion);
foreach (const Import &import, view->model()->imports()) {
if (import.isLibraryImport()
&& import.url() == newImport.url()) {
// reuse this import
newImport = import;
break;
}
}
if (!view->model()->hasImport(newImport, true, true))
view->model()->changeImports(QList<Import>() << newImport, QList<Import>());
}
QmlItemNode QmlItemNode::createQmlItemNodeFromImage(AbstractView *view, const QString &imageName, const QPointF &position, QmlItemNode parentQmlItemNode)
{
QmlItemNode newQmlItemNode;
......@@ -209,8 +190,6 @@ QmlItemNode QmlItemNode::createQmlItemNodeFromImage(AbstractView *view, const QS
if (parentQmlItemNode.isValid()) {
RewriterTransaction transaction = view->beginRewriterTransaction(QByteArrayLiteral("QmlItemNode::createQmlItemNodeFromImage"));
checkImageImport(view);
if (view->model()->hasNodeMetaInfo("QtQuick.Image")) {
NodeMetaInfo metaInfo = view->model()->metaInfo("QtQuick.Image");
QList<QPair<PropertyName, QVariant> > propertyPairList;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment