Commit 3d54df88 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.Rewriter: fixing file imports for alias imports

Change-Id: I87070a0b8594770049109c0a4c27a014c2bafeec
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 44075e0d
......@@ -154,10 +154,12 @@ QString QmlTextGenerator::toQml(const ModelNode &node, int indentDepth) const
QString alias;
if (!url.isEmpty()) {
const QString &versionUrl = QString("%1.%2").arg(QString::number(node.majorVersion()), QString::number(node.minorVersion()));
foreach (const Import &import, node.model()->imports()) {
if (import.url() == url
&& import.version() == versionUrl) {
if (import.url() == url) {
alias = import.alias();
break;
}
if (import.file() == url) {
alias = import.alias();
break;
}
......
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