diff --git a/src/plugins/qmldesigner/designercore/include/nodelistproperty.h b/src/plugins/qmldesigner/designercore/include/nodelistproperty.h index fa46635b97e..8bc8590cc33 100644 --- a/src/plugins/qmldesigner/designercore/include/nodelistproperty.h +++ b/src/plugins/qmldesigner/designercore/include/nodelistproperty.h @@ -46,13 +46,13 @@ class NodeListPropertyIterator public: using iterator_category = std::random_access_iterator_tag; - using difference_type = int; + using difference_type = qsizetype; using value_type = ModelNode; using pointer = InternalNodeListPropertyPointer; using reference = ModelNode; NodeListPropertyIterator() = default; - NodeListPropertyIterator(int currentIndex, + NodeListPropertyIterator(difference_type currentIndex, class InternalNodeListProperty *nodeListProperty, Model *model, AbstractView *view) @@ -68,7 +68,7 @@ public: return *this; } - NodeListPropertyIterator operator++(difference_type) + NodeListPropertyIterator operator++(int) { auto tmp = *this; ++m_currentIndex; @@ -81,7 +81,7 @@ public: return *this; } - NodeListPropertyIterator operator--(difference_type) + NodeListPropertyIterator operator--(int) { auto tmp = *this; --m_currentIndex; @@ -168,7 +168,7 @@ private: InternalNodeListProperty *m_nodeListProperty{}; Model *m_model{}; AbstractView *m_view{}; - int m_currentIndex = -1; + difference_type m_currentIndex = -1; }; } // namespace Internal diff --git a/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp b/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp index 5f475cfd397..512f37722a9 100644 --- a/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp +++ b/src/plugins/qmldesigner/designercore/model/nodelistproperty.cpp @@ -177,7 +177,7 @@ NodeListProperty::iterator NodeListProperty::rotate(NodeListProperty::iterator f privateModel()->notifyNodeOrderChanged(m_internalNodeListProperty); - return {int(iter - begin), internalNodeListProperty().data(), model(), view()}; + return {iter - begin, internalNodeListProperty().data(), model(), view()}; } void NodeListProperty::reverse(NodeListProperty::iterator first, NodeListProperty::iterator last)