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/declarative | |
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/declarative')
6 files changed, 5 insertions, 9 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h index b15ddbd..bfa27a8 100644 --- a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h @@ -68,10 +68,10 @@ class QDeclarativePinchAreaPrivate : public QDeclarativeItemPrivate public: QDeclarativePinchAreaPrivate() : absorb(true), stealMouse(false), inPinch(false) - , pinchRejected(false), pinchActivated(false) + , pinchRejected(false), pinchActivated(false), touchEventsActive(false) , pinch(0), pinchStartDist(0), pinchStartScale(1.0) , pinchLastScale(1.0), pinchStartRotation(0.0), pinchStartAngle(0.0) - , pinchLastAngle(0.0), pinchRotation(0.0), touchEventsActive(false) + , pinchLastAngle(0.0), pinchRotation(0.0) { } diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index a9fbd3f..081db4a 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1106,7 +1106,6 @@ bool QDeclarativeTextPrivate::setHAlign(QDeclarativeText::HAlignment alignment, { Q_Q(QDeclarativeText); if (hAlign != alignment || forceAlign) { - QDeclarativeText::HAlignment oldEffectiveHAlign = q->effectiveHAlign(); hAlign = alignment; emit q->horizontalAlignmentChanged(hAlign); return true; diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index fd14eb2..d45d40b 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -534,7 +534,6 @@ bool QDeclarativeTextEditPrivate::setHAlign(QDeclarativeTextEdit::HAlignment ali { Q_Q(QDeclarativeTextEdit); if (hAlign != alignment || forceAlign) { - QDeclarativeTextEdit::HAlignment oldEffectiveHAlign = q->effectiveHAlign(); hAlign = alignment; emit q->horizontalAlignmentChanged(alignment); return true; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 16b8e89..8148eca 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -394,7 +394,6 @@ bool QDeclarativeTextInputPrivate::setHAlign(QDeclarativeTextInput::HAlignment a { Q_Q(QDeclarativeTextInput); if ((hAlign != alignment || forceAlign) && alignment <= QDeclarativeTextInput::AlignHCenter) { // justify not supported - QDeclarativeTextInput::HAlignment oldEffectiveHAlign = q->effectiveHAlign(); hAlign = alignment; emit q->horizontalAlignmentChanged(alignment); return true; diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index bb563fd..b057257 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -266,7 +266,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, case QVariant::PointF: { bool ok; - QPointF point = QDeclarativeStringConverters::pointFFromString(string, &ok); + QDeclarativeStringConverters::pointFFromString(string, &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: point expected")); } break; @@ -274,7 +274,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, case QVariant::SizeF: { bool ok; - QSizeF size = QDeclarativeStringConverters::sizeFFromString(string, &ok); + QDeclarativeStringConverters::sizeFFromString(string, &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: size expected")); } break; @@ -282,7 +282,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, case QVariant::RectF: { bool ok; - QRectF rect = QDeclarativeStringConverters::rectFFromString(string, &ok); + QDeclarativeStringConverters::rectFFromString(string, &ok); if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: rect expected")); } break; diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 8094a92..e6b9775 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -1450,7 +1450,6 @@ struct ValueTypeSerializedData : public SerializedData { QByteArray QDeclarativePropertyPrivate::saveValueType(const QMetaObject *metaObject, int index, const QMetaObject *subObject, int subIndex) { - QMetaProperty prop = metaObject->property(index); QMetaProperty subProp = subObject->property(subIndex); ValueTypeSerializedData sd; |