Commit 42ad06ee authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Use proper meta info for Item

The QML minor version does not always match the
QtQuick.Item minor version. The wrong version
leads to warnings/error messages later.

Change-Id: I5d38c17da079d8309db4fd4044eb0be4e9093dae
Reviewed-by: Tim Jenssen's avatarTim Jenssen <>
Reviewed-by: Eike Ziller's avatarEike Ziller <>
parent ec0ff0cf
......@@ -840,8 +840,13 @@ void addItemToStackedContainer(const SelectionContext &selectionContext)
RewriterTransaction transaction =
NodeMetaInfo itemMetaInfo = view->model()->metaInfo("QtQuick.Item", -1, -1);
QTC_ASSERT(itemMetaInfo.isValid(), return);
QTC_ASSERT(itemMetaInfo.majorVersion() == 2, return);
QmlDesigner::ModelNode itemNode =
view->createModelNode("QtQuick.Item", view->majorQtQuickVersion(), view->minorQtQuickVersion());
view->createModelNode("QtQuick.Item", itemMetaInfo.majorVersion(), itemMetaInfo.minorVersion());
if (potentialTabBar.isValid()) {// The stacked container is hooked up to a TabBar
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