Commit 08558c7f authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.Itemlibrary: fixing visibility of items

We ingnore a difference in minor version to avoid duplication
for minor versions (Qt Quick 1/Qt Quick 1.1)

If the imported is forced (entry.forceImport) valid is ignored.

Change-Id: I26bcfea5062e8d8ee2568766df9c94a1e387cee2
Reviewed-by: default avatarMarco Bubke <>
parent afcd9d4c
......@@ -403,9 +403,12 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
foreach (ItemLibraryEntry entry, itemLibraryInfo->entries()) {
bool valid = model->metaInfo(entry.typeName(), entry.majorVersion(), entry.minorVersion()).isValid();
NodeMetaInfo metaInfo = model->metaInfo(entry.typeName(), -1, -1);
bool valid = metaInfo.isValid() && metaInfo.majorVersion() == entry.majorVersion();
if (valid && (entry.requiredImport().isEmpty() || model->hasImport(entryToImport(entry), true, true) || entry.forceImport())) {
if ((valid || entry.forceImport())
&& (entry.requiredImport().isEmpty()
|| model->hasImport(entryToImport(entry), true, false) || entry.forceImport())) {
QString itemSectionName = entry.category();
ItemLibrarySectionModel *sectionModel;
ItemLibraryItemModel *itemModel;
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