diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2024-04-17 13:07:56 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2024-04-18 13:20:15 +0000 |
commit | ad408553af7d3e40dacb28298d9b4e7a74ea3761 (patch) | |
tree | f56dc27f72b616a05259b183082b64a026038d69 /src/plugins | |
parent | c709e6d5552c734e795b61090288a81abc6321ed (diff) |
QmlDesigner: Enable expanding content library user categories
Change-Id: Id3b49773b02e4922a06b71e6ed7a7098ed4d4062
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp | 6 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.h | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp index f62ef95fcc..243e0d9662 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 2dde73e5de..26edbf5ec3 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 |