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: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Thomas Hartmann
2013-06-05 14:08:00 +02:00
committed by Marco Bubke
parent d2faf880f3
commit 03e76d80a8

View File

@@ -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);
}
}
}
}