aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml10
-rw-r--r--src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp6
-rw-r--r--src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.h2
3 files changed, 4 insertions, 14 deletions
diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml
index 47d3c6ce773..85123af3743 100644
--- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml
+++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryUserView.qml
@@ -73,16 +73,10 @@ HelperWidgets.ScrollView {
caption: categoryName
visible: categoryVisible
- expanded: categoryExpanded
- expandOnClick: false
category: "ContentLib_User"
- onToggleExpand: categoryExpanded = !categoryExpanded
- onExpand: categoryExpanded = true
- onCollapse: categoryExpanded = false
-
function expandSection() {
- categoryExpanded = true
+ section.expanded = true
}
property alias count: repeater.count
@@ -123,7 +117,7 @@ HelperWidgets.ScrollView {
roleValue: "texture"
delegate: ContentLibraryTexture {
width: root.cellWidth
- height: root.cellHeight
+ height: root.cellWidth // for textures use a square size since there is no name row
// onShowContextMenu: ctxMenu.popupMenu(modelData) // TODO
}
diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp
index f62ef95fccc..243e0d96622 100644
--- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp
+++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp
@@ -64,9 +64,6 @@ QVariant ContentLibraryUserModel::data(const QModelIndex &index, int role) const
if (role == VisibleRole)
return true; // TODO
- if (role == ExpandedRole)
- return true; // TODO
-
return {};
}
@@ -148,7 +145,6 @@ QHash<int, QByteArray> ContentLibraryUserModel::roleNames() const
static const QHash<int, QByteArray> roles {
{NameRole, "categoryName"},
{VisibleRole, "categoryVisible"},
- {ExpandedRole, "categoryExpanded"},
{ItemsRole, "categoryItems"}
};
return roles;
@@ -289,7 +285,7 @@ void ContentLibraryUserModel::loadTextureBundle()
}
int texSectionIdx = 1;
- emit dataChanged(index(texSectionIdx, 0), index(texSectionIdx, 0));
+ emit dataChanged(index(texSectionIdx), index(texSectionIdx));
}
bool ContentLibraryUserModel::hasRequiredQuick3DImport() const
diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.h b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.h
index 2dde73e5de4..26edbf5ec33 100644
--- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.h
+++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.h
@@ -125,7 +125,7 @@ private:
QString m_importerBundleId;
QStringList m_importerSharedFiles;
- enum Roles { NameRole = Qt::UserRole + 1, VisibleRole, ExpandedRole, ItemsRole };
+ enum Roles { NameRole = Qt::UserRole + 1, VisibleRole, ItemsRole };
};
} // namespace QmlDesigner