forked from qt-creator/qt-creator
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:
committed by
Marco Bubke
parent
d2faf880f3
commit
03e76d80a8
@@ -1021,8 +1021,19 @@ void NodeMetaInfoPrivate::setupPrototypes()
|
|||||||
description.className = qmlValue->moduleName().toUtf8() + '.' + description.className;
|
description.className = qmlValue->moduleName().toUtf8() + '.' + description.className;
|
||||||
m_prototypes.append(description);
|
m_prototypes.append(description);
|
||||||
} else {
|
} 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);
|
m_prototypes.append(description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user