forked from qt-creator/qt-creator
QmlDesigner: Fix compile fix
Amends 82a010f67a
.
Turns out that 04dc959d49e5e3 in Qt 6.4 introduces a source
incompatibility intentionally.
Use 'auto' to cover old and new behavior.
Change-Id: I4cf69393e0c1a483261b3f283b6bce97f664e3ce
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -360,13 +360,15 @@ void MaterialBrowserModel::copyMaterialProperties(int idx, const QString §io
|
||||
if (propsSpecObj.contains(section)) { // should always be true
|
||||
m_copiedMaterialProps.clear();
|
||||
const QJsonArray propNames = propsSpecObj.value(section).toArray();
|
||||
for (const QJsonValueConstRef &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 QJsonValueConstRef &propName : propNames)
|
||||
// auto == QJsonValueConstRef after 04dc959d49e5e3 / Qt 6.4, QJsonValueRef before
|
||||
for (const auto &propName : propNames)
|
||||
m_copiedMaterialProps.append(mat.property(propName.toString().toLatin1()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user