forked from qt-creator/qt-creator
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:
@@ -181,9 +181,9 @@ QPointF MoveManipulator::findSnappingOffset(const QHash<FormEditorItem*, QRectF>
|
|||||||
QMap<double, double> verticalOffsetMap;
|
QMap<double, double> verticalOffsetMap;
|
||||||
QMap<double, double> horizontalOffsetMap;
|
QMap<double, double> horizontalOffsetMap;
|
||||||
|
|
||||||
QHashIterator<FormEditorItem*, QRectF> hashIterator(boundingRectHash);
|
for (auto hashIterator = boundingRectHash.cbegin(), end = boundingRectHash.cend();
|
||||||
while (hashIterator.hasNext()) {
|
hashIterator != end;
|
||||||
hashIterator.next();
|
++hashIterator) {
|
||||||
FormEditorItem *formEditorItem = hashIterator.key();
|
FormEditorItem *formEditorItem = hashIterator.key();
|
||||||
QRectF boundingRect = hashIterator.value();
|
QRectF boundingRect = hashIterator.value();
|
||||||
|
|
||||||
@@ -230,10 +230,10 @@ QHash<FormEditorItem*, QRectF> MoveManipulator::tanslatedBoundingRects(const QHa
|
|||||||
{
|
{
|
||||||
QHash<FormEditorItem*, QRectF> translatedBoundingRectHash;
|
QHash<FormEditorItem*, QRectF> translatedBoundingRectHash;
|
||||||
|
|
||||||
QHashIterator<FormEditorItem*, QRectF> hashIterator(boundingRectHash);
|
for (auto hashIterator = boundingRectHash.cbegin(), end = boundingRectHash.cend();
|
||||||
while (hashIterator.hasNext()) {
|
hashIterator != end;
|
||||||
|
++hashIterator) {
|
||||||
QPointF alignedOffset(offsetVector);
|
QPointF alignedOffset(offsetVector);
|
||||||
hashIterator.next();
|
|
||||||
FormEditorItem *formEditorItem = hashIterator.key();
|
FormEditorItem *formEditorItem = hashIterator.key();
|
||||||
QRectF boundingRect = transform.mapRect(hashIterator.value());
|
QRectF boundingRect = transform.mapRect(hashIterator.value());
|
||||||
|
|
||||||
|
@@ -42,20 +42,15 @@ ResizeIndicator::~ResizeIndicator()
|
|||||||
|
|
||||||
void ResizeIndicator::show()
|
void ResizeIndicator::show()
|
||||||
{
|
{
|
||||||
QHashIterator<FormEditorItem*, ResizeController> itemControllerIterator(m_itemControllerHash);
|
for (ResizeController controller : m_itemControllerHash)
|
||||||
while (itemControllerIterator.hasNext()) {
|
|
||||||
ResizeController controller = itemControllerIterator.next().value();
|
|
||||||
controller.show();
|
controller.show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
void ResizeIndicator::hide()
|
void ResizeIndicator::hide()
|
||||||
{
|
{
|
||||||
QHashIterator<FormEditorItem*, ResizeController> itemControllerIterator(m_itemControllerHash);
|
for (ResizeController controller : m_itemControllerHash)
|
||||||
while (itemControllerIterator.hasNext()) {
|
|
||||||
ResizeController controller = itemControllerIterator.next().value();
|
|
||||||
controller.hide();
|
controller.hide();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ResizeIndicator::clear()
|
void ResizeIndicator::clear()
|
||||||
{
|
{
|
||||||
|
@@ -311,9 +311,9 @@ QList<QLineF> Snapper::findSnappingLines(const SnapLineMap &snappingLineMap,
|
|||||||
{
|
{
|
||||||
QList<QLineF> lineList;
|
QList<QLineF> lineList;
|
||||||
|
|
||||||
SnapLineMapIterator snappingLineIterator(snappingLineMap);
|
for (auto snappingLineIterator = snappingLineMap.cbegin(), end = snappingLineMap.cend();
|
||||||
while (snappingLineIterator.hasNext()) {
|
snappingLineIterator != end;
|
||||||
snappingLineIterator.next();
|
++snappingLineIterator) {
|
||||||
|
|
||||||
if (compareLines(snapLine, snappingLineIterator.key())) { // near distance snapping lines
|
if (compareLines(snapLine, snappingLineIterator.key())) { // near distance snapping lines
|
||||||
lineList += createSnapLine(orientation,
|
lineList += createSnapLine(orientation,
|
||||||
@@ -339,9 +339,9 @@ QList<QLineF> Snapper::findSnappingOffsetLines(const SnapLineMap &snappingOffset
|
|||||||
{
|
{
|
||||||
QList<QLineF> lineList;
|
QList<QLineF> lineList;
|
||||||
|
|
||||||
SnapLineMapIterator snappingOffsetIterator(snappingOffsetMap);
|
for (auto snappingOffsetIterator = snappingOffsetMap.cbegin(), end = snappingOffsetMap.cend();
|
||||||
while (snappingOffsetIterator.hasNext()) {
|
snappingOffsetIterator != end;
|
||||||
snappingOffsetIterator.next();
|
++snappingOffsetIterator) {
|
||||||
|
|
||||||
const QRectF &formEditorItemRect(snappingOffsetIterator.value().first);
|
const QRectF &formEditorItemRect(snappingOffsetIterator.value().first);
|
||||||
double formEditorItemRectLowerLimit;
|
double formEditorItemRectLowerLimit;
|
||||||
@@ -377,9 +377,9 @@ double Snapper::snappedOffsetForLines(const SnapLineMap &snappingLineMap,
|
|||||||
{
|
{
|
||||||
QMultiMap<double, double> minimumSnappingLineMap;
|
QMultiMap<double, double> minimumSnappingLineMap;
|
||||||
|
|
||||||
SnapLineMapIterator snappingLineIterator(snappingLineMap);
|
for (auto snappingLineIterator = snappingLineMap.cbegin(), end = snappingLineMap.cend();
|
||||||
while (snappingLineIterator.hasNext()) {
|
snappingLineIterator != end;
|
||||||
snappingLineIterator.next();
|
++snappingLineIterator) {
|
||||||
double snapLine = snappingLineIterator.key();
|
double snapLine = snappingLineIterator.key();
|
||||||
double offset = value - snapLine;
|
double offset = value - snapLine;
|
||||||
double distance = qAbs(offset);
|
double distance = qAbs(offset);
|
||||||
@@ -403,9 +403,9 @@ double Snapper::snappedOffsetForOffsetLines(const SnapLineMap &snappingOffsetMap
|
|||||||
{
|
{
|
||||||
QMultiMap<double, double> minimumSnappingLineMap;
|
QMultiMap<double, double> minimumSnappingLineMap;
|
||||||
|
|
||||||
SnapLineMapIterator snappingOffsetIterator(snappingOffsetMap);
|
for (auto snappingOffsetIterator = snappingOffsetMap.cbegin(), end = snappingOffsetMap.cend();
|
||||||
while (snappingOffsetIterator.hasNext()) {
|
snappingOffsetIterator != end;
|
||||||
snappingOffsetIterator.next();
|
++snappingOffsetIterator) {
|
||||||
double snapLine = snappingOffsetIterator.key();
|
double snapLine = snappingOffsetIterator.key();
|
||||||
const QRectF &formEditorItemRect(snappingOffsetIterator.value().first);
|
const QRectF &formEditorItemRect(snappingOffsetIterator.value().first);
|
||||||
double formEditorItemRectLowerLimit;
|
double formEditorItemRectLowerLimit;
|
||||||
@@ -492,13 +492,12 @@ static QList<QLineF> mergedHorizontalLines(const QList<QLineF> &lineList)
|
|||||||
});
|
});
|
||||||
|
|
||||||
QList<QLineF> lineWithTheSameY;
|
QList<QLineF> lineWithTheSameY;
|
||||||
QListIterator<QLineF> sortedLineListIterator(sortedLineList);
|
for (int i = 0, n = sortedLineList.size(); i < n; ++i) {
|
||||||
while (sortedLineListIterator.hasNext()) {
|
QLineF line = sortedLineList.at(i);
|
||||||
QLineF line = sortedLineListIterator.next();
|
|
||||||
lineWithTheSameY.append(line);
|
lineWithTheSameY.append(line);
|
||||||
|
|
||||||
if (sortedLineListIterator.hasNext()) {
|
if (i + 1 < n) {
|
||||||
QLineF nextLine = sortedLineListIterator.peekNext();
|
QLineF nextLine = sortedLineList.at(i + 1);
|
||||||
if (!qFuzzyCompare(line.y1(), nextLine.y1())) {
|
if (!qFuzzyCompare(line.y1(), nextLine.y1())) {
|
||||||
mergedLineList.append(mergedHorizontalLine(lineWithTheSameY));
|
mergedLineList.append(mergedHorizontalLine(lineWithTheSameY));
|
||||||
lineWithTheSameY.clear();
|
lineWithTheSameY.clear();
|
||||||
@@ -521,13 +520,12 @@ static QList<QLineF> mergedVerticalLines(const QList<QLineF> &lineList)
|
|||||||
});
|
});
|
||||||
|
|
||||||
QList<QLineF> lineWithTheSameX;
|
QList<QLineF> lineWithTheSameX;
|
||||||
QListIterator<QLineF> sortedLineListIterator(sortedLineList);
|
for (int i = 0, n = sortedLineList.size(); i < n; ++i) {
|
||||||
while (sortedLineListIterator.hasNext()) {
|
QLineF line = sortedLineList.at(i);
|
||||||
QLineF line = sortedLineListIterator.next();
|
|
||||||
lineWithTheSameX.append(line);
|
lineWithTheSameX.append(line);
|
||||||
|
|
||||||
if (sortedLineListIterator.hasNext()) {
|
if (i + 1 < n) {
|
||||||
QLineF nextLine = sortedLineListIterator.peekNext();
|
QLineF nextLine = sortedLineList.at(i + 1);
|
||||||
if (!qFuzzyCompare(line.x1(), nextLine.x1())) {
|
if (!qFuzzyCompare(line.x1(), nextLine.x1())) {
|
||||||
mergedLineList.append(mergedVerticalLine(lineWithTheSameX));
|
mergedLineList.append(mergedVerticalLine(lineWithTheSameX));
|
||||||
lineWithTheSameX.clear();
|
lineWithTheSameX.clear();
|
||||||
@@ -565,9 +563,9 @@ static QmlItemNode findItemOnSnappingLine(const QmlItemNode &sourceQmlItemNode,
|
|||||||
else
|
else
|
||||||
compareAnchorLineType = AnchorLineLeft;
|
compareAnchorLineType = AnchorLineLeft;
|
||||||
|
|
||||||
SnapLineMapIterator snapLineIterator(snappingLines);
|
for (auto snapLineIterator = snappingLines.cbegin(), end = snappingLines.cend();
|
||||||
while (snapLineIterator.hasNext()) {
|
snapLineIterator != end;
|
||||||
snapLineIterator.next();
|
++snapLineIterator) {
|
||||||
double snapLine = snapLineIterator.key();
|
double snapLine = snapLineIterator.key();
|
||||||
|
|
||||||
if (qAbs(snapLine - anchorLine ) < 1.0) {
|
if (qAbs(snapLine - anchorLine ) < 1.0) {
|
||||||
|
@@ -32,7 +32,6 @@ namespace QmlDesigner {
|
|||||||
class FormEditorItem;
|
class FormEditorItem;
|
||||||
|
|
||||||
using SnapLineMap = QMultiMap<double, QPair<QRectF, FormEditorItem*> >;
|
using SnapLineMap = QMultiMap<double, QPair<QRectF, FormEditorItem*> >;
|
||||||
using SnapLineMapIterator = QMapIterator<double, QPair<QRectF, FormEditorItem*> >;
|
|
||||||
|
|
||||||
class FormEditorItem;
|
class FormEditorItem;
|
||||||
|
|
||||||
|
@@ -104,9 +104,9 @@ void PathItem::writeCubicPath(const ModelNode &pathNode, const CubicSegment &cub
|
|||||||
|
|
||||||
void PathItem::writePathAttributes(const ModelNode &pathNode, const QMap<QString, QVariant> &attributes)
|
void PathItem::writePathAttributes(const ModelNode &pathNode, const QMap<QString, QVariant> &attributes)
|
||||||
{
|
{
|
||||||
QMapIterator<QString, QVariant> attributesIterator(attributes);
|
for (auto attributesIterator = attributes.cbegin(), end = attributes.cend();
|
||||||
while (attributesIterator.hasNext()) {
|
attributesIterator != end;
|
||||||
attributesIterator.next();
|
++attributesIterator) {
|
||||||
QList<QPair<PropertyName, QVariant> > propertyList;
|
QList<QPair<PropertyName, QVariant> > propertyList;
|
||||||
propertyList.append(PropertyPair("name", attributesIterator.key()));
|
propertyList.append(PropertyPair("name", attributesIterator.key()));
|
||||||
propertyList.append(PropertyPair("value", attributesIterator.value()));
|
propertyList.append(PropertyPair("value", attributesIterator.value()));
|
||||||
|
@@ -204,8 +204,8 @@ void NodeInstanceView::modelAboutToBeDetached(Model * model)
|
|||||||
|
|
||||||
void NodeInstanceView::handleCrash()
|
void NodeInstanceView::handleCrash()
|
||||||
{
|
{
|
||||||
int elaspsedTimeSinceLastCrash = m_lastCrashTime.restart();
|
qint64 elaspsedTimeSinceLastCrash = m_lastCrashTime.restart();
|
||||||
int forceRestartTime = 2000;
|
qint64 forceRestartTime = 2000;
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
forceRestartTime = 4000;
|
forceRestartTime = 4000;
|
||||||
#endif
|
#endif
|
||||||
@@ -816,9 +816,10 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand()
|
|||||||
bindingPropertyList.append(node.bindingProperties());
|
bindingPropertyList.append(node.bindingProperties());
|
||||||
if (node.isValid() && hasInstanceForModelNode(node)) {
|
if (node.isValid() && hasInstanceForModelNode(node)) {
|
||||||
NodeInstance instance = instanceForModelNode(node);
|
NodeInstance instance = instanceForModelNode(node);
|
||||||
QHashIterator<PropertyName, QVariant> auxiliaryIterator(node.auxiliaryData());
|
const QHash<PropertyName, QVariant> aux = node.auxiliaryData();
|
||||||
while (auxiliaryIterator.hasNext()) {
|
for (auto auxiliaryIterator = aux.cbegin(), end = aux.cend();
|
||||||
auxiliaryIterator.next();
|
auxiliaryIterator != end;
|
||||||
|
++auxiliaryIterator) {
|
||||||
PropertyValueContainer container(instance.instanceId(), auxiliaryIterator.key(), auxiliaryIterator.value(), TypeName());
|
PropertyValueContainer container(instance.instanceId(), auxiliaryIterator.key(), auxiliaryIterator.value(), TypeName());
|
||||||
auxiliaryContainerVector.append(container);
|
auxiliaryContainerVector.append(container);
|
||||||
}
|
}
|
||||||
|
@@ -502,11 +502,8 @@ QMultiHash<ModelNode, InformationName> convertModelNodeInformationHash(const QMu
|
|||||||
{
|
{
|
||||||
QMultiHash<ModelNode, InformationName> convertedModelNodeInformationHash;
|
QMultiHash<ModelNode, InformationName> convertedModelNodeInformationHash;
|
||||||
|
|
||||||
QHashIterator<ModelNode, InformationName> hashIterator(informationChangeHash);
|
for (auto it = informationChangeHash.cbegin(), end = informationChangeHash.cend(); it != end; ++it)
|
||||||
while (hashIterator.hasNext()) {
|
convertedModelNodeInformationHash.insert(ModelNode(it.key(), view), it.value());
|
||||||
hashIterator.next();
|
|
||||||
convertedModelNodeInformationHash.insert(ModelNode(hashIterator.key(), view), hashIterator.value());
|
|
||||||
}
|
|
||||||
|
|
||||||
return convertedModelNodeInformationHash;
|
return convertedModelNodeInformationHash;
|
||||||
}
|
}
|
||||||
|
@@ -37,9 +37,7 @@ void ModelNodePositionStorage::cleanupInvalidOffsets()
|
|||||||
{
|
{
|
||||||
QHash<ModelNode, RewriterData> validModelNodes;
|
QHash<ModelNode, RewriterData> validModelNodes;
|
||||||
|
|
||||||
QHashIterator<ModelNode, RewriterData> iter(m_rewriterData);
|
for (auto iter = m_rewriterData.cbegin(), end = m_rewriterData.cend(); iter != end; ++iter) {
|
||||||
while (iter.hasNext()) {
|
|
||||||
iter.next();
|
|
||||||
const ModelNode modelNode = iter.key();
|
const ModelNode modelNode = iter.key();
|
||||||
if (modelNode.isValid())
|
if (modelNode.isValid())
|
||||||
validModelNodes.insert(modelNode, iter.value());
|
validModelNodes.insert(modelNode, iter.value());
|
||||||
|
@@ -67,10 +67,8 @@ void RewriteActionCompressor::compressImports(QList<RewriteAction *> &actions) c
|
|||||||
QHash<Import, RewriteAction *> addedImports;
|
QHash<Import, RewriteAction *> addedImports;
|
||||||
QHash<Import, RewriteAction *> removedImports;
|
QHash<Import, RewriteAction *> removedImports;
|
||||||
|
|
||||||
QMutableListIterator<RewriteAction *> iter(actions);
|
for (int i = actions.size(); --i >= 0; ) {
|
||||||
iter.toBack();
|
RewriteAction *action = actions.at(i);
|
||||||
while (iter.hasPrevious()) {
|
|
||||||
RewriteAction *action = iter.previous();
|
|
||||||
|
|
||||||
if (RemoveImportRewriteAction *removeImportAction = action->asRemoveImportRewriteAction()) {
|
if (RemoveImportRewriteAction *removeImportAction = action->asRemoveImportRewriteAction()) {
|
||||||
const Import import = removeImportAction->import();
|
const Import import = removeImportAction->import();
|
||||||
@@ -113,10 +111,8 @@ void RewriteActionCompressor::compressRereparentActions(QList<RewriteAction *> &
|
|||||||
QList<RewriteAction *> actionsToRemove;
|
QList<RewriteAction *> actionsToRemove;
|
||||||
QHash<ModelNode, ReparentNodeRewriteAction *> reparentedNodes;
|
QHash<ModelNode, ReparentNodeRewriteAction *> reparentedNodes;
|
||||||
|
|
||||||
QMutableListIterator<RewriteAction*> iter(actions);
|
for (int i = actions.size(); --i >= 0; ) {
|
||||||
iter.toBack();
|
RewriteAction *action = actions.at(i);
|
||||||
while (iter.hasPrevious()) {
|
|
||||||
RewriteAction *action = iter.previous();
|
|
||||||
|
|
||||||
if (ReparentNodeRewriteAction *reparentAction = action->asReparentNodeRewriteAction()) {
|
if (ReparentNodeRewriteAction *reparentAction = action->asReparentNodeRewriteAction()) {
|
||||||
const ModelNode reparentedNode = reparentAction->reparentedNode();
|
const ModelNode reparentedNode = reparentAction->reparentedNode();
|
||||||
@@ -139,10 +135,9 @@ void RewriteActionCompressor::compressRereparentActions(QList<RewriteAction *> &
|
|||||||
void RewriteActionCompressor::compressReparentIntoSamePropertyActions(QList<RewriteAction *> &actions) const
|
void RewriteActionCompressor::compressReparentIntoSamePropertyActions(QList<RewriteAction *> &actions) const
|
||||||
{
|
{
|
||||||
QList<RewriteAction *> actionsToRemove;
|
QList<RewriteAction *> actionsToRemove;
|
||||||
QMutableListIterator<RewriteAction *> iter(actions);
|
|
||||||
iter.toBack();
|
for (int i = actions.size(); --i >= 0; ) {
|
||||||
while (iter.hasPrevious()) {
|
RewriteAction *action = actions.at(i);
|
||||||
RewriteAction *action = iter.previous();
|
|
||||||
|
|
||||||
if (ReparentNodeRewriteAction *reparentAction = action->asReparentNodeRewriteAction()) {
|
if (ReparentNodeRewriteAction *reparentAction = action->asReparentNodeRewriteAction()) {
|
||||||
if (reparentAction->targetProperty() == reparentAction->oldParentProperty())
|
if (reparentAction->targetProperty() == reparentAction->oldParentProperty())
|
||||||
@@ -161,10 +156,8 @@ void RewriteActionCompressor::compressAddEditRemoveNodeActions(QList<RewriteActi
|
|||||||
QList<RewriteAction *> actionsToRemove;
|
QList<RewriteAction *> actionsToRemove;
|
||||||
QHash<ModelNode, RewriteAction *> removedNodes;
|
QHash<ModelNode, RewriteAction *> removedNodes;
|
||||||
|
|
||||||
QMutableListIterator<RewriteAction*> iter(actions);
|
for (int i = actions.size(); --i >= 0; ) {
|
||||||
iter.toBack();
|
RewriteAction *action = actions.at(i);
|
||||||
while (iter.hasPrevious()) {
|
|
||||||
RewriteAction *action = iter.previous();
|
|
||||||
|
|
||||||
if (RemoveNodeRewriteAction *removeNodeAction = action->asRemoveNodeRewriteAction()) {
|
if (RemoveNodeRewriteAction *removeNodeAction = action->asRemoveNodeRewriteAction()) {
|
||||||
const ModelNode modelNode = removeNodeAction->node();
|
const ModelNode modelNode = removeNodeAction->node();
|
||||||
@@ -220,10 +213,8 @@ void RewriteActionCompressor::compressPropertyActions(QList<RewriteAction *> &ac
|
|||||||
QHash<AbstractProperty, ChangePropertyRewriteAction *> changedProperties;
|
QHash<AbstractProperty, ChangePropertyRewriteAction *> changedProperties;
|
||||||
QHash<AbstractProperty, AddPropertyRewriteAction *> addedProperties;
|
QHash<AbstractProperty, AddPropertyRewriteAction *> addedProperties;
|
||||||
|
|
||||||
QMutableListIterator<RewriteAction*> iter(actions);
|
for (int i = actions.size(); --i >= 0; ) {
|
||||||
iter.toBack();
|
RewriteAction *action = actions.at(i);
|
||||||
while (iter.hasPrevious()) {
|
|
||||||
RewriteAction *action = iter.previous();
|
|
||||||
|
|
||||||
if (RemovePropertyRewriteAction *removeAction = action->asRemovePropertyRewriteAction()) {
|
if (RemovePropertyRewriteAction *removeAction = action->asRemovePropertyRewriteAction()) {
|
||||||
const AbstractProperty property = removeAction->property();
|
const AbstractProperty property = removeAction->property();
|
||||||
@@ -271,10 +262,7 @@ void RewriteActionCompressor::compressAddEditActions(QList<RewriteAction *> &act
|
|||||||
QSet<ModelNode> addedNodes;
|
QSet<ModelNode> addedNodes;
|
||||||
QSet<RewriteAction *> dirtyActions;
|
QSet<RewriteAction *> dirtyActions;
|
||||||
|
|
||||||
QMutableListIterator<RewriteAction*> iter(actions);
|
for (RewriteAction *action : qAsConst(actions)) {
|
||||||
while (iter.hasNext()) {
|
|
||||||
RewriteAction *action = iter.next();
|
|
||||||
|
|
||||||
if (action->asAddPropertyRewriteAction() || action->asChangePropertyRewriteAction()) {
|
if (action->asAddPropertyRewriteAction() || action->asChangePropertyRewriteAction()) {
|
||||||
AbstractProperty property;
|
AbstractProperty property;
|
||||||
ModelNode containedNode;
|
ModelNode containedNode;
|
||||||
@@ -343,10 +331,8 @@ void RewriteActionCompressor::compressAddReparentActions(QList<RewriteAction *>
|
|||||||
QList<RewriteAction *> actionsToRemove;
|
QList<RewriteAction *> actionsToRemove;
|
||||||
QMap<ModelNode, RewriteAction*> addedNodes;
|
QMap<ModelNode, RewriteAction*> addedNodes;
|
||||||
|
|
||||||
QMutableListIterator<RewriteAction*> iter(actions);
|
for (int i = 0, n = actions.size(); i < n; ++i) {
|
||||||
while (iter.hasNext()) {
|
RewriteAction *action = actions.at(i);
|
||||||
RewriteAction *action = iter.next();
|
|
||||||
|
|
||||||
if (action->asAddPropertyRewriteAction() || action->asChangePropertyRewriteAction()) {
|
if (action->asAddPropertyRewriteAction() || action->asChangePropertyRewriteAction()) {
|
||||||
ModelNode containedNode;
|
ModelNode containedNode;
|
||||||
|
|
||||||
@@ -377,7 +363,7 @@ void RewriteActionCompressor::compressAddReparentActions(QList<RewriteAction *>
|
|||||||
changeAction->containedModelNode());
|
changeAction->containedModelNode());
|
||||||
}
|
}
|
||||||
|
|
||||||
iter.setValue(replacementAction);
|
actions[i] = replacementAction;
|
||||||
delete action;
|
delete action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -96,9 +96,9 @@ static inline void applyProperties(ModelNode &node, const QHash<PropertyName, QV
|
|||||||
node.setAuxiliaryData(propertyName, QVariant());
|
node.setAuxiliaryData(propertyName, QVariant());
|
||||||
}
|
}
|
||||||
|
|
||||||
QHashIterator<PropertyName, QVariant> propertyIterator(propertyHash);
|
for (auto propertyIterator = propertyHash.cbegin(), end = propertyHash.cend();
|
||||||
while (propertyIterator.hasNext()) {
|
propertyIterator != end;
|
||||||
propertyIterator.next();
|
++propertyIterator) {
|
||||||
const PropertyName propertyName = propertyIterator.key();
|
const PropertyName propertyName = propertyIterator.key();
|
||||||
if (propertyName == "width" || propertyName == "height") {
|
if (propertyName == "width" || propertyName == "height") {
|
||||||
node.setAuxiliaryData(propertyIterator.key(), propertyIterator.value());
|
node.setAuxiliaryData(propertyIterator.key(), propertyIterator.value());
|
||||||
|
Reference in New Issue
Block a user