QmlDesigner: Compile fix with current Qt dev

Change-Id: I36fc5871193b600ed4576b14dd1aa141140f30d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-08-22 10:05:34 +02:00
parent 7b40f1ed7e
commit de57a63609

View File

@@ -363,13 +363,15 @@ void MaterialBrowserModel::copyMaterialProperties(int idx, const QString &sectio
if (propsSpecObj.contains(section)) { // should always be true
m_copiedMaterialProps.clear();
const QJsonArray propNames = propsSpecObj.value(section).toArray();
for (const QJsonValueRef &propName : propNames)
// auto == QJsonValueConstRef after 04dc959d49e5e3 / Qt 6.4, QJsonValueRef before
for (const auto &propName : propNames)
m_copiedMaterialProps.append(mat.property(propName.toString().toLatin1()));
if (section == "Base") { // add QtQuick3D.Material base props as well
QJsonObject propsMatObj = m_propertyGroupsObj.value("Material").toObject();
const QJsonArray propNames = propsMatObj.value("Base").toArray();
for (const QJsonValueRef &propName : propNames)
// auto == QJsonValueConstRef after 04dc959d49e5e3 / Qt 6.4, QJsonValueRef before
for (const auto &propName : propNames)
m_copiedMaterialProps.append(mat.property(propName.toString().toLatin1()));
}
}