forked from qt-creator/qt-creator
QmlDesigner: Change NodeListPropertyIterator::difference_type to qsizetype
Should fixes Qt5 <-> Qt6 differences. Amends I743f942fb0bef9f907b4facbb346264dfeaad778 Change-Id: I7545936e6c5b725cedd0606039008f0c5bdbfdd2 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user