summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-06-28 13:15:13 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-01 02:02:17 +0200
commit64a7ac344ee324d47b96b411482b666cc619633f (patch)
tree115e243e453979635062c3d7b82b49a63961eb6d /src/gui/painting
parent4bc450408c917381b486c03a0462b3c7b88abe1e (diff)
Deal with unused functions, as found by the Intel compiler
Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected): qglobal.cpp(2069): warning #177: function "<unnamed>::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced Remove functions really not used: qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced Change-Id: I1e5558e206b04edea381442030dc69536198d966 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qbezier.cpp55
-rw-r--r--src/gui/painting/qpathclipper.cpp10
2 files changed, 0 insertions, 65 deletions
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index 6cef7cc501..2762560da7 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -150,33 +150,6 @@ static inline int quadraticRoots(qreal a, qreal b, qreal c,
}
}
-static inline bool findInflections(qreal a, qreal b, qreal c,
- qreal *t1 , qreal *t2, qreal *tCups)
-{
- qreal r1 = 0, r2 = 0;
-
- short rootsCount = quadraticRoots(a, b, c, &r1, &r2);
-
- if (rootsCount >= 1) {
- if (r1 < r2) {
- *t1 = r1;
- *t2 = r2;
- } else {
- *t1 = r2;
- *t2 = r1;
- }
- if (!qFuzzyIsNull(a))
- *tCups = qreal(0.5) * (-b / a);
- else
- *tCups = 2;
-
- return true;
- }
-
- return false;
-}
-
-
void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold) const
{
QBezier beziers[10];
@@ -531,34 +504,6 @@ static QDebug operator<<(QDebug dbg, const QBezier &bz)
}
#endif
-static inline void splitBezierAt(const QBezier &bez, qreal t,
- QBezier *left, QBezier *right)
-{
- left->x1 = bez.x1;
- left->y1 = bez.y1;
-
- left->x2 = bez.x1 + t * ( bez.x2 - bez.x1 );
- left->y2 = bez.y1 + t * ( bez.y2 - bez.y1 );
-
- left->x3 = bez.x2 + t * ( bez.x3 - bez.x2 ); // temporary holding spot
- left->y3 = bez.y2 + t * ( bez.y3 - bez.y2 ); // temporary holding spot
-
- right->x3 = bez.x3 + t * ( bez.x4 - bez.x3 );
- right->y3 = bez.y3 + t * ( bez.y4 - bez.y3 );
-
- right->x2 = left->x3 + t * ( right->x3 - left->x3);
- right->y2 = left->y3 + t * ( right->y3 - left->y3);
-
- left->x3 = left->x2 + t * ( left->x3 - left->x2 );
- left->y3 = left->y2 + t * ( left->y3 - left->y2 );
-
- left->x4 = right->x1 = left->x3 + t * (right->x2 - left->x3);
- left->y4 = right->y1 = left->y3 + t * (right->y2 - left->y3);
-
- right->x4 = bez.x4;
- right->y4 = bez.y4;
-}
-
qreal QBezier::length(qreal error) const
{
qreal length = qreal(0.0);
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 2702b56e73..243c99e671 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -1036,16 +1036,6 @@ qreal QWingedEdge::delta(int vertex, int a, int b) const
return result;
}
-static inline QPointF midPoint(const QWingedEdge &list, int ei)
-{
- const QPathEdge *ep = list.edge(ei);
- Q_ASSERT(ep);
-
- const QPointF a = *list.vertex(ep->first);
- const QPointF b = *list.vertex(ep->second);
- return a + 0.5 * (b - a);
-}
-
QWingedEdge::TraversalStatus QWingedEdge::findInsertStatus(int vi, int ei) const
{
const QPathVertex *vp = vertex(vi);