diff options
Diffstat (limited to 'src/quick/designer/qquickdesignersupport.cpp')
-rw-r--r-- | src/quick/designer/qquickdesignersupport.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/designer/qquickdesignersupport.cpp b/src/quick/designer/qquickdesignersupport.cpp index f063cd3a81..44be12bb78 100644 --- a/src/quick/designer/qquickdesignersupport.cpp +++ b/src/quick/designer/qquickdesignersupport.cpp @@ -236,7 +236,8 @@ bool QQuickDesignerSupport::isAnchoredTo(QQuickItem *fromItem, QQuickItem *toIte bool QQuickDesignerSupport::areChildrenAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem) { - Q_FOREACH (QQuickItem *childItem, fromItem->childItems()) { + const auto childItems = fromItem->childItems(); + for (QQuickItem *childItem : childItems) { if (childItem) { if (isAnchoredTo(childItem, toItem)) return true; @@ -392,10 +393,10 @@ void QQuickDesignerSupport::emitComponentCompleteSignalForAttachedProperty(QQuic QList<QObject*> QQuickDesignerSupport::statesForItem(QQuickItem *item) { QList<QObject*> objectList; - QList<QQuickState *> stateList = QQuickItemPrivate::get(item)->_states()->states(); + const QList<QQuickState *> stateList = QQuickItemPrivate::get(item)->_states()->states(); objectList.reserve(stateList.size()); - Q_FOREACH (QQuickState* state, stateList) + for (QQuickState* state : stateList) objectList.append(state); return objectList; |