QPainterPathStroker: make QPen constructor explicit
A QPainterPathStroker is not an equivalent representation of a QPen, so
the constructor that takes a QPen should be explicit.
Arguably, the named constructor idiom would be even better here:
static QPainterPathStroker QPainterPathStroker::fromPen(const QPen &pen);
But QPainterPathStroker is non-copyable.
Change-Id: I3148dc0ee336026781d8bc1baf21c113c7b41ce8
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
bb10
parent
ae4e44644a
commit
f41d5ec626
|
|
@ -244,7 +244,7 @@ class Q_GUI_EXPORT QPainterPathStroker
|
|||
Q_DECLARE_PRIVATE(QPainterPathStroker)
|
||||
public:
|
||||
QPainterPathStroker();
|
||||
QPainterPathStroker(const QPen &pen);
|
||||
explicit QPainterPathStroker(const QPen &pen);
|
||||
~QPainterPathStroker();
|
||||
|
||||
void setWidth(qreal width);
|
||||
|
|
|
|||
Loading…
Reference in New Issue