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>
This commit is contained in:
Marc Mutz 2014-02-20 14:26:54 +01:00 committed by The Qt Project
parent ae4e44644a
commit f41d5ec626

View File

@ -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);