Commit 03e76d80 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Marco Bubke

QmlDesigner.PropertyEditor: We fully qualify QML components

When collecting the super classes/types we did not fully
qualify QML components.
(e.g. just Button instead of QtQuick.Controls.Button)

This patch now fully qualifies the QML component.

The missing qualification broke the specifics mechanism in
the property editor (see task).

Task-number: QTCREATORBUG-9222
Change-Id: I61b6b6432493c1c440356547003269767415acb4
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent d2faf880
......@@ -1021,8 +1021,19 @@ void NodeMetaInfoPrivate::setupPrototypes()
description.className = qmlValue->moduleName().toUtf8() + '.' + description.className;
m_prototypes.append(description);
} else {
if (context()->lookupType(document(), QStringList() << ov->className()))
if (context()->lookupType(document(), QStringList() << ov->className())) {
const Imports *allImports = context()->imports(document());
ImportInfo importInfo = allImports->info(description.className, context().data());
if (importInfo.isValid()) {
QString uri = importInfo.name();
uri.replace(QLatin1String(","), QLatin1String("."));
if (!uri.isEmpty())
description.className = QString(uri + QString::fromLatin1(".") + QString::fromLatin1(description.className)).toLatin1();
}
m_prototypes.append(description);
}
}
}
}
......
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