mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
fix deprecated warning QPainter::drawRoundRect
Use QPainter::drawRoundedRect instead. This function was introduced in Qt 4.4.
This commit is contained in:
committed by
Laurent Trinques
parent
74c3fc8dd9
commit
de88b32e5b
@@ -253,7 +253,7 @@ void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
|
|||||||
t.setStyle(Qt::DashDotLine);
|
t.setStyle(Qt::DashDotLine);
|
||||||
t.setCosmetic(true);
|
t.setCosmetic(true);
|
||||||
painter -> setPen(t);
|
painter -> setPen(t);
|
||||||
painter -> drawRoundRect(boundingRect(), 10, 10);
|
painter -> drawRoundedRect(boundingRect(), 10, 10);
|
||||||
|
|
||||||
painter -> restore();
|
painter -> restore();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ void Element::drawSelection(QPainter *painter, const QStyleOptionGraphicsItem *o
|
|||||||
t.setCosmetic(true);
|
t.setCosmetic(true);
|
||||||
painter -> setPen(t);
|
painter -> setPen(t);
|
||||||
// Le dessin se fait a partir du rectangle delimitant
|
// Le dessin se fait a partir du rectangle delimitant
|
||||||
painter -> drawRoundRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10);
|
painter -> drawRoundedRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10);
|
||||||
painter -> restore();
|
painter -> restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ void Element::drawHighlight(QPainter *painter, const QStyleOptionGraphicsItem *o
|
|||||||
painter -> setPen(Qt::NoPen);
|
painter -> setPen(Qt::NoPen);
|
||||||
painter -> setBrush(brush);
|
painter -> setBrush(brush);
|
||||||
// Le dessin se fait a partir du rectangle delimitant
|
// Le dessin se fait a partir du rectangle delimitant
|
||||||
painter -> drawRoundRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10);
|
painter -> drawRoundedRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10);
|
||||||
painter -> restore();
|
painter -> restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ void ElementTextItemGroup::paint(QPainter *painter, const QStyleOptionGraphicsIt
|
|||||||
t.setStyle(Qt::DashDotLine);
|
t.setStyle(Qt::DashDotLine);
|
||||||
t.setCosmetic(true);
|
t.setCosmetic(true);
|
||||||
painter->setPen(t);
|
painter->setPen(t);
|
||||||
painter->drawRoundRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10);
|
painter->drawRoundedRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10);
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user