summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremy Katz <jeremy.katz@nokia.com>2009-09-29 11:03:42 (GMT)
committerJeremy Katz <jeremy.katz@nokia.com>2009-09-29 11:03:42 (GMT)
commite9ef0cd651bcfeb85262e877c693f5efe07dff8e (patch)
tree4af3b622587e50b86679bd4c5830a626d4eec36b /src
parent777c02085e0f30d0dceb57a9ac96a44999b4a028 (diff)
downloadQt-e9ef0cd651bcfeb85262e877c693f5efe07dff8e.zip
Qt-e9ef0cd651bcfeb85262e877c693f5efe07dff8e.tar.gz
Qt-e9ef0cd651bcfeb85262e877c693f5efe07dff8e.tar.bz2
fix warnings about declarations shadowing class members (autotest reported)
Reviewed-by: Olivier
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qevent.h2
-rw-r--r--src/gui/math3d/qmatrix4x4.h40
-rw-r--r--src/gui/math3d/qquaternion.h34
-rw-r--r--src/gui/math3d/qvector2d.h4
-rw-r--r--src/gui/math3d/qvector3d.h6
-rw-r--r--src/gui/math3d/qvector4d.h8
-rw-r--r--src/testlib/qtestcoreelement.h6
7 files changed, 50 insertions, 50 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index fa2b22f..4396766 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -807,7 +807,7 @@ public:
// internal
inline void setWidget(QWidget *awidget) { _widget = awidget; }
inline void setDeviceType(DeviceType adeviceType) { _deviceType = adeviceType; }
- inline void setTouchPointStates(Qt::TouchPointStates touchPointStates) { _touchPointStates = touchPointStates; }
+ inline void setTouchPointStates(Qt::TouchPointStates aTouchPointStates) { _touchPointStates = aTouchPointStates; }
inline void setTouchPoints(const QList<QTouchEvent::TouchPoint> &atouchPoints) { _touchPoints = atouchPoints; }
protected:
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index cfa3f2a..b32e00a 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -228,14 +228,14 @@ Q_INLINE_TEMPLATE QMatrix4x4::QMatrix4x4
(const QGenericMatrix<N, M, qreal>& matrix)
{
const qreal *values = matrix.constData();
- for (int col = 0; col < 4; ++col) {
- for (int row = 0; row < 4; ++row) {
- if (col < N && row < M)
- m[col][row] = values[col * M + row];
- else if (col == row)
- m[col][row] = 1.0f;
+ for (int matrixCol = 0; matrixCol < 4; ++matrixCol) {
+ for (int matrixRow = 0; matrixRow < 4; ++matrixRow) {
+ if (matrixCol < N && matrixRow < M)
+ m[matrixCol][matrixRow] = values[matrixCol * M + matrixRow];
+ else if (matrixCol == matrixRow)
+ m[matrixCol][matrixRow] = 1.0f;
else
- m[col][row] = 0.0f;
+ m[matrixCol][matrixRow] = 0.0f;
}
}
flagBits = General;
@@ -246,14 +246,14 @@ QGenericMatrix<N, M, qreal> QMatrix4x4::toGenericMatrix() const
{
QGenericMatrix<N, M, qreal> result;
qreal *values = result.data();
- for (int col = 0; col < N; ++col) {
- for (int row = 0; row < M; ++row) {
- if (col < 4 && row < 4)
- values[col * M + row] = m[col][row];
- else if (col == row)
- values[col * M + row] = 1.0f;
+ for (int matrixCol = 0; matrixCol < N; ++matrixCol) {
+ for (int matrixRow = 0; matrixRow < M; ++matrixRow) {
+ if (matrixCol < 4 && matrixRow < 4)
+ values[matrixCol * M + matrixRow] = m[matrixCol][matrixRow];
+ else if (matrixCol == matrixRow)
+ values[matrixCol * M + matrixRow] = 1.0f;
else
- values[col * M + row] = 0.0f;
+ values[matrixCol * M + matrixRow] = 0.0f;
}
}
return result;
@@ -261,17 +261,17 @@ QGenericMatrix<N, M, qreal> QMatrix4x4::toGenericMatrix() const
#endif
-inline const qreal& QMatrix4x4::operator()(int row, int column) const
+inline const qreal& QMatrix4x4::operator()(int aRow, int aColumn) const
{
- Q_ASSERT(row >= 0 && row < 4 && column >= 0 && column < 4);
- return m[column][row];
+ Q_ASSERT(aRow >= 0 && aRow < 4 && aColumn >= 0 && aColumn < 4);
+ return m[aColumn][aRow];
}
-inline qreal& QMatrix4x4::operator()(int row, int column)
+inline qreal& QMatrix4x4::operator()(int aRow, int aColumn)
{
- Q_ASSERT(row >= 0 && row < 4 && column >= 0 && column < 4);
+ Q_ASSERT(aRow >= 0 && aRow < 4 && aColumn >= 0 && aColumn < 4);
flagBits = General;
- return m[column][row];
+ return m[aColumn][aRow];
}
inline QVector4D QMatrix4x4::column(int index) const
diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h
index dd5dddc..7480a5c 100644
--- a/src/gui/math3d/qquaternion.h
+++ b/src/gui/math3d/qquaternion.h
@@ -138,7 +138,7 @@ private:
inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {}
-inline QQuaternion::QQuaternion(qreal scalar, qreal xpos, qreal ypos, qreal zpos) : wp(scalar), xp(xpos), yp(ypos), zp(zpos) {}
+inline QQuaternion::QQuaternion(qreal aScalar, qreal xpos, qreal ypos, qreal zpos) : wp(aScalar), xp(xpos), yp(ypos), zp(zpos) {}
inline bool QQuaternion::isNull() const
@@ -156,10 +156,10 @@ inline qreal QQuaternion::y() const { return qreal(yp); }
inline qreal QQuaternion::z() const { return qreal(zp); }
inline qreal QQuaternion::scalar() const { return qreal(wp); }
-inline void QQuaternion::setX(qreal x) { xp = x; }
-inline void QQuaternion::setY(qreal y) { yp = y; }
-inline void QQuaternion::setZ(qreal z) { zp = z; }
-inline void QQuaternion::setScalar(qreal scalar) { wp = scalar; }
+inline void QQuaternion::setX(qreal aX) { xp = aX; }
+inline void QQuaternion::setY(qreal aY) { yp = aY; }
+inline void QQuaternion::setZ(qreal aZ) { zp = aZ; }
+inline void QQuaternion::setScalar(qreal aScalar) { wp = aScalar; }
inline QQuaternion QQuaternion::conjugate() const
{
@@ -274,14 +274,14 @@ inline bool qFuzzyCompare(const QQuaternion& q1, const QQuaternion& q2)
#ifndef QT_NO_VECTOR3D
-inline QQuaternion::QQuaternion(qreal scalar, const QVector3D& vector)
- : wp(scalar), xp(vector.x()), yp(vector.y()), zp(vector.z()) {}
+inline QQuaternion::QQuaternion(qreal aScalar, const QVector3D& aVector)
+ : wp(aScalar), xp(aVector.x()), yp(aVector.y()), zp(aVector.z()) {}
-inline void QQuaternion::setVector(const QVector3D& vector)
+inline void QQuaternion::setVector(const QVector3D& aVector)
{
- xp = vector.x();
- yp = vector.y();
- zp = vector.z();
+ xp = aVector.x();
+ yp = aVector.y();
+ zp = aVector.z();
}
inline QVector3D QQuaternion::vector() const
@@ -291,17 +291,17 @@ inline QVector3D QQuaternion::vector() const
#endif
-inline void QQuaternion::setVector(qreal x, qreal y, qreal z)
+inline void QQuaternion::setVector(qreal aX, qreal aY, qreal aZ)
{
- xp = x;
- yp = y;
- zp = z;
+ xp = aX;
+ yp = aY;
+ zp = aZ;
}
#ifndef QT_NO_VECTOR4D
-inline QQuaternion::QQuaternion(const QVector4D& vector)
- : wp(vector.w()), xp(vector.x()), yp(vector.y()), zp(vector.z()) {}
+inline QQuaternion::QQuaternion(const QVector4D& aVector)
+ : wp(aVector.w()), xp(aVector.x()), yp(aVector.y()), zp(aVector.z()) {}
inline QVector4D QQuaternion::toVector4D() const
{
diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h
index 570e864..cd9a12c 100644
--- a/src/gui/math3d/qvector2d.h
+++ b/src/gui/math3d/qvector2d.h
@@ -144,8 +144,8 @@ inline bool QVector2D::isNull() const
inline qreal QVector2D::x() const { return qreal(xp); }
inline qreal QVector2D::y() const { return qreal(yp); }
-inline void QVector2D::setX(qreal x) { xp = x; }
-inline void QVector2D::setY(qreal y) { yp = y; }
+inline void QVector2D::setX(qreal aX) { xp = aX; }
+inline void QVector2D::setY(qreal aY) { yp = aY; }
inline QVector2D &QVector2D::operator+=(const QVector2D &vector)
{
diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h
index 1291c96..60bd693 100644
--- a/src/gui/math3d/qvector3d.h
+++ b/src/gui/math3d/qvector3d.h
@@ -160,9 +160,9 @@ inline qreal QVector3D::x() const { return qreal(xp); }
inline qreal QVector3D::y() const { return qreal(yp); }
inline qreal QVector3D::z() const { return qreal(zp); }
-inline void QVector3D::setX(qreal x) { xp = x; }
-inline void QVector3D::setY(qreal y) { yp = y; }
-inline void QVector3D::setZ(qreal z) { zp = z; }
+inline void QVector3D::setX(qreal aX) { xp = aX; }
+inline void QVector3D::setY(qreal aY) { yp = aY; }
+inline void QVector3D::setZ(qreal aZ) { zp = aZ; }
inline QVector3D &QVector3D::operator+=(const QVector3D &vector)
{
diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h
index ad0718a..c35b536 100644
--- a/src/gui/math3d/qvector4d.h
+++ b/src/gui/math3d/qvector4d.h
@@ -158,10 +158,10 @@ inline qreal QVector4D::y() const { return qreal(yp); }
inline qreal QVector4D::z() const { return qreal(zp); }
inline qreal QVector4D::w() const { return qreal(wp); }
-inline void QVector4D::setX(qreal x) { xp = x; }
-inline void QVector4D::setY(qreal y) { yp = y; }
-inline void QVector4D::setZ(qreal z) { zp = z; }
-inline void QVector4D::setW(qreal w) { wp = w; }
+inline void QVector4D::setX(qreal aX) { xp = aX; }
+inline void QVector4D::setY(qreal aY) { yp = aY; }
+inline void QVector4D::setZ(qreal aZ) { zp = aZ; }
+inline void QVector4D::setW(qreal aW) { wp = aW; }
inline QVector4D &QVector4D::operator+=(const QVector4D &vector)
{
diff --git a/src/testlib/qtestcoreelement.h b/src/testlib/qtestcoreelement.h
index e9691d5..b5e5d0f 100644
--- a/src/testlib/qtestcoreelement.h
+++ b/src/testlib/qtestcoreelement.h
@@ -93,9 +93,9 @@ void QTestCoreElement<ElementType>::addAttribute(const QTest::AttributeIndex att
if (attribute(attributeIndex))
return;
- QTestElementAttribute *attribute = new QTestElementAttribute;
- attribute->setPair(attributeIndex, value);
- attribute->addToList(&listOfAttributes);
+ QTestElementAttribute *testAttribute = new QTestElementAttribute;
+ testAttribute->setPair(attributeIndex, value);
+ testAttribute->addToList(&listOfAttributes);
}
template <class ElementType>