diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-09-28 14:16:36 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-29 06:12:32 (GMT) |
commit | d65dbb5d508d4cdbc383686428430035c205b21c (patch) | |
tree | 35457ae8b8cb93fdae295ac28c78d221091b98d9 /src/opengl | |
parent | 66e7e69f00a08664f0c0a6ed62a37a6918eaf8f3 (diff) | |
download | Qt-d65dbb5d508d4cdbc383686428430035c205b21c.zip Qt-d65dbb5d508d4cdbc383686428430035c205b21c.tar.gz Qt-d65dbb5d508d4cdbc383686428430035c205b21c.tar.bz2 |
Fix g++/MinGW compiler warnings.
- Assigned/Unused variables.
- Unsigned comparison >= 0 is always true.
- Constructor initialization order.
- Signed/Unsigned comparisons.
Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 5 | ||||
-rw-r--r-- | src/opengl/qpaintengine_opengl.cpp | 3 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index c32803c..07701c6 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -513,21 +513,18 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c m_dash_stroker.setMiterLimit(pen.miterLimit()); m_dash_stroker.setClipRect(clip); - float curvynessAdd, curvynessMul, roundness = 0; + float curvynessAdd, curvynessMul; // simplfy pens that are thin in device size (2px wide or less) if (width < 2.5 && (cosmetic || m_inv_scale == 1)) { curvynessAdd = 0.5; curvynessMul = CURVE_FLATNESS / m_inv_scale; - roundness = 1; } else if (cosmetic) { curvynessAdd= width / 2; curvynessMul= CURVE_FLATNESS; - roundness = qMax<int>(4, width * CURVE_FLATNESS); } else { curvynessAdd = width * m_inv_scale; curvynessMul = CURVE_FLATNESS / m_inv_scale; - roundness = qMax<int>(4, width * curvynessMul); } if (count < 2) diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 5948e3e..9368b3b 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -1561,8 +1561,6 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF bool has_mirrored_repeat = QGLExtensions::glExtensions() & QGLExtensions::MirroredRepeat; Qt::BrushStyle style = brush.style(); - QTransform m = brush.transform(); - if (has_mirrored_repeat && style == Qt::LinearGradientPattern) { const QLinearGradient *g = static_cast<const QLinearGradient *>(brush.gradient()); QTransform m = brush.transform(); @@ -3781,7 +3779,6 @@ void QOpenGLPaintEngine::drawLines(const QLineF *lines, int lineCount) } else { QVarLengthArray<GLfloat> vertexArray(4 * lineCount); for (int i = 0; i < lineCount; ++i) { - const QPointF a = lines[i].p1(); vertexArray[4*i] = lines[i].x1(); vertexArray[4*i+1] = lines[i].y1(); vertexArray[4*i+2] = lines[i].x2(); |