From f41d5ec626d23423bc7d0cd66ba4566a3d00872d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 20 Feb 2014 14:26:54 +0100 Subject: 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 --- src/gui/painting/qpainterpath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/painting/qpainterpath.h') diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index c922867eb9..db65e14af9 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -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); -- cgit v1.2.3