QmlDesigner: Compile fix: More Java-style iterator removal

We use QT_NO_JAVA_STYLE_ITERATORS, and Qt dev has wrapped more
iterators with that, so without this patch (or undefining
QT_NO_JAVA_STYLE_ITERATORS) creator does not compile.

Change-Id: I7d3ef0ed11db72e07333e21311725cd13136696a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
hjk
2019-07-31 13:27:56 +02:00
parent 6cb17fcae9
commit b7366f3cce
10 changed files with 62 additions and 88 deletions

View File

@@ -96,9 +96,9 @@ static inline void applyProperties(ModelNode &node, const QHash<PropertyName, QV
node.setAuxiliaryData(propertyName, QVariant());
}
QHashIterator<PropertyName, QVariant> propertyIterator(propertyHash);
while (propertyIterator.hasNext()) {
propertyIterator.next();
for (auto propertyIterator = propertyHash.cbegin(), end = propertyHash.cend();
propertyIterator != end;
++propertyIterator) {
const PropertyName propertyName = propertyIterator.key();
if (propertyName == "width" || propertyName == "height") {
node.setAuxiliaryData(propertyIterator.key(), propertyIterator.value());