From 4ae0b655b270d5c8d38903b5ed960971161a672f Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Tue, 8 Dec 2015 17:50:28 +0300 Subject: QCosmeticStroker: fix misleading use of & on bool operands Change-Id: I0e885391b220c30fc1482446d1dc9a2be035d45a Reviewed-by: Marc Mutz --- src/gui/painting/qcosmeticstroker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 8c3fd2ce4f..3112d551b2 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -538,7 +538,7 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) QPointF p2 = QPointF(p[-2], p[-1]) * state->matrix; calculateLastPoint(p1.x(), p1.y(), p2.x(), p2.y()); } - int caps = (!closed & drawCaps) ? CapBegin : NoCaps; + int caps = (!closed && drawCaps) ? CapBegin : NoCaps; // qDebug() << "closed =" << closed << capString(caps); points += 2; @@ -589,7 +589,7 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) const qreal *end = points + 2*path.elementCount(); // handle closed path case bool closed = path.hasImplicitClose() || (points[0] == end[-2] && points[1] == end[-1]); - int caps = (!closed & drawCaps) ? CapBegin : NoCaps; + int caps = (!closed && drawCaps) ? CapBegin : NoCaps; if (closed) { QPointF p2 = QPointF(end[-2], end[-1]) * state->matrix; calculateLastPoint(p2.x(), p2.y(), p.x(), p.y()); -- cgit v1.2.3