QmlDesigner: Fix propertyGroups.json warning for 2D projects

Load property groups file only if Quick3D import exists

Change-Id: Idf7b95cb4efa34dde6196964e5e2cbad54341193
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Mahmoud Badri
2022-08-22 16:09:42 +03:00
parent 3b73b27862
commit 86d1526564
4 changed files with 21 additions and 6 deletions

View File

@@ -95,8 +95,9 @@ bool MaterialBrowserModel::isValidIndex(int idx) const
* propertyGroups.json contains lists of QtQuick3D objects' properties grouped by sections
*
* @param path path to propertyGroups.json file
* @return load successful
*/
void MaterialBrowserModel::loadPropertyGroups(const QString &path)
bool MaterialBrowserModel::loadPropertyGroups(const QString &path)
{
bool ok = true;
@@ -131,6 +132,8 @@ void MaterialBrowserModel::loadPropertyGroups(const QString &path)
m_customMaterialSections.append(customMatSections);
}
emit materialSectionsChanged();
return ok;
}
QHash<int, QByteArray> MaterialBrowserModel::roleNames() const