Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f8bdaf0e authored by Jarosław Staniek's avatar Jarosław Staniek

Replace obsolete QRect*::unite() with united()

GIT_SILENT
parent 0e1087db
......@@ -160,7 +160,7 @@ void KisShapeSelectionModel::childChanged(KoShape * child, KoShape::ChangeType t
if (type == KoShape::ParentChanged) return;
QRectF changedRect = m_shapeMap[child];
changedRect = changedRect.unite(child->boundingRect());
changedRect = changedRect.united(child->boundingRect());
m_shapeMap[child] = child->boundingRect();
QTransform matrix;
......
......@@ -313,12 +313,12 @@ QRectF KoPathPoint::boundingRect(bool active) const
if (!active && activeControlPoint1()) {
QRectF r1(d->point, QSize(1, 1));
r1.setBottomRight(d->controlPoint1);
rect = rect.unite(r1);
rect = rect.united(r1);
}
if (!active && activeControlPoint2()) {
QRectF r2(d->point, QSize(1, 1));
r2.setBottomRight(d->controlPoint2);
rect = rect.unite(r2);
rect = rect.united(r2);
}
if (d->shape)
return d->shape->shapeToDocument(rect);
......
......@@ -358,7 +358,7 @@ template <typename T>
void KoRTree<T>::insertHelper(const QRectF& bb, const T& data, int id)
{
QRectF nbb(bb.normalized());
// This has to be done as it is not possible to use QRectF::unite() with a isNull()
// This has to be done as it is not possible to use QRectF::united() with a isNull()
if (nbb.isNull()) {
nbb.setWidth(0.0001);
nbb.setHeight(0.0001);
......@@ -586,7 +586,7 @@ QPair<int, int> KoRTree<T>::pickSeeds(Node *node)
if (i != j) {
QRectF bb1(node->childBoundingBox(i));
QRectF bb2(node->childBoundingBox(j));
QRectF comp(node->childBoundingBox(i).unite(node->childBoundingBox(j)));
QRectF comp(node->childBoundingBox(i).united(node->childBoundingBox(j)));
qreal area = comp.width() * comp.height() - bb1.width() * bb1.height() - bb2.width() * bb2.height();
//qDebug() << " ps" << i << j << area;
if (area > max) {
......@@ -609,8 +609,8 @@ QPair<int, int> KoRTree<T>::pickNext(Node * node, QVector<bool> & marker, Node *
int group = 0;
for (int i = 0; i < m_capacity + 1; ++i) {
if (marker[i] == false) {
QRectF bb1 = group1->boundingBox().unite(node->childBoundingBox(i));
QRectF bb2 = group2->boundingBox().unite(node->childBoundingBox(i));
QRectF bb1 = group1->boundingBox().united(node->childBoundingBox(i));
QRectF bb2 = group2->boundingBox().united(node->childBoundingBox(i));
qreal d1 = bb1.width() * bb1.height() - group1->boundingBox().width() * group1->boundingBox().height();
qreal d2 = bb2.width() * bb2.height() - group2->boundingBox().width() * group2->boundingBox().height();
qreal diff = qAbs(d1 - d2);
......@@ -754,7 +754,7 @@ void KoRTree<T>::Node::updateBoundingBox()
{
m_boundingBox = QRectF();
for (int i = 0; i < m_counter; ++i) {
m_boundingBox = m_boundingBox.unite(m_childBoundingBox[i]);
m_boundingBox = m_boundingBox.united(m_childBoundingBox[i]);
}
}
......@@ -807,7 +807,7 @@ void KoRTree<T>::NonLeafNode::insert(const QRectF& bb, Node * data)
data->setPlace(this->m_counter);
data->setParent(this);
this->m_childBoundingBox[this->m_counter] = bb;
this->m_boundingBox = this->m_boundingBox.unite(bb);
this->m_boundingBox = this->m_boundingBox.united(bb);
//qDebug() << "NonLeafNode::insert" << this->nodeId() << data->nodeId();
++this->m_counter;
}
......@@ -898,7 +898,7 @@ typename KoRTree<T>::Node * KoRTree<T>::NonLeafNode::getLeastEnlargement(const Q
//qDebug() << "NonLeafNode::getLeastEnlargement";
QVarLengthArray<qreal> area(this->m_counter);
for (int i = 0; i < this->m_counter; ++i) {
QSizeF big(this->m_childBoundingBox[i].unite(bb).size());
QSizeF big(this->m_childBoundingBox[i].united(bb).size());
area[i] = big.width() * big.height() - this->m_childBoundingBox[i].width() * this->m_childBoundingBox[i].height();
}
......@@ -962,7 +962,7 @@ void KoRTree<T>::LeafNode::insert(const QRectF& bb, const T& data, int id)
m_data[this->m_counter] = data;
m_dataIds[this->m_counter] = id;
this->m_childBoundingBox[this->m_counter] = bb;
this->m_boundingBox = this->m_boundingBox.unite(bb);
this->m_boundingBox = this->m_boundingBox.united(bb);
++this->m_counter;
}
......
......@@ -53,7 +53,7 @@ QRectF KoShapeLayer::boundingRect() const
if (bb.isEmpty())
bb = shape->boundingRect();
else
bb = bb.unite(shape->boundingRect());
bb = bb.united(shape->boundingRect());
}
return bb;
......
......@@ -185,7 +185,7 @@ void KoShapeGroupCommand::undo()
bound = shape->boundingRect();
boundingRectInitialized = true;
} else
bound = bound.unite(shape->boundingRect());
bound = bound.united(shape->boundingRect());
}
// the group has changed position and so have the group child shapes
// -> we need compensate the group position change
......@@ -210,7 +210,7 @@ QRectF KoShapeGroupCommandPrivate::containerBoundingRect()
foreach(KoShape *shape, shapes) {
if (boundingRectInitialized)
bound = bound.unite(shape->boundingRect());
bound = bound.united(shape->boundingRect());
else {
bound = shape->boundingRect();
boundingRectInitialized = true;
......
......@@ -46,7 +46,7 @@ ShapeMoveStrategy::ShapeMoveStrategy(KoToolBase *tool, const QPointF &clicked)
m_selectedShapes << shape;
m_previousPositions << shape->position();
m_newPositions << shape->position();
boundingRect = boundingRect.unite( shape->boundingRect() );
boundingRect = boundingRect.united( shape->boundingRect() );
}
KoSelection * selection = m_canvas->shapeManager()->selection();
m_initialOffset = selection->absolutePosition( SelectionDecorator::hotPosition() ) - m_start;
......
......@@ -105,7 +105,7 @@ QPainterPath BasicElement::selectionRegion(const int pos1, const int pos2) const
QRectF r1(l1.p1(),l2.p2());
QRectF r2(l2.p1(),l1.p2());
QPainterPath temp;
temp.addRect(r1.unite(r2));
temp.addRect(r1.united(r2));
return temp;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment