diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-04-19 17:24:08 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-23 06:46:55 +0200 |
commit | 13ded224ed2c8847101f325e92a7283615f6a73a (patch) | |
tree | e65992f3ddc934a8ca6b726ad7c9fb70e8e01a30 | |
parent | 66399c6584a86180c1955e5d34617fa46b07f36e (diff) |
QtDeclarative: Fix compiler warnings.
- QString from ASCII conversion, remove global-static QString
variable from class.
- Signed/unsigned comparison.
- Unused variable.
Change-Id: I4ea3e72da85ba7ed329196d39085d7bba8bfa389
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
-rw-r--r-- | src/qml/qml/qqmlrewrite.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlrewrite_p.h | 3 | ||||
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 1 |
4 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlrewrite.cpp b/src/qml/qml/qqmlrewrite.cpp index bbb17b631d..83ede9456b 100644 --- a/src/qml/qml/qqmlrewrite.cpp +++ b/src/qml/qml/qqmlrewrite.cpp @@ -47,12 +47,10 @@ QT_BEGIN_NAMESPACE -DEFINE_BOOL_CONFIG_OPTION(rewriteDump, QML_REWRITE_DUMP); +DEFINE_BOOL_CONFIG_OPTION(rewriteDump, QML_REWRITE_DUMP) namespace QQmlRewrite { -QString SharedBindingTester::evalString("eval"); - static void rewriteStringLiteral(AST::StringLiteral *ast, const QString *code, int startPosition, TextWriter *writer) { const unsigned position = ast->firstSourceLocation().begin() - startPosition + 1; diff --git a/src/qml/qml/qqmlrewrite_p.h b/src/qml/qml/qqmlrewrite_p.h index efa10ce316..064398115a 100644 --- a/src/qml/qml/qqmlrewrite_p.h +++ b/src/qml/qml/qqmlrewrite_p.h @@ -73,8 +73,6 @@ public: inline virtual bool visit(AST::FunctionDeclaration *); inline virtual bool visit(AST::FunctionExpression *); inline virtual bool visit(AST::IdentifierExpression *); - - static QString evalString; }; class RewriteBinding: protected AST::Visitor @@ -159,6 +157,7 @@ bool SharedBindingTester::visit(AST::FunctionExpression *) bool SharedBindingTester::visit(AST::IdentifierExpression *e) { + static const QString evalString = QStringLiteral("eval"); if (e->name == evalString) _sharable = false; diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 9c570d756b..27a339221b 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1141,7 +1141,7 @@ v8::Handle<v8::Value> createComponent(const v8::Arguments &args) // Default to engine parent; this will be removed in the near future (QTBUG-24841) QObject *parentArg = engine; - unsigned consumedCount = 1; + int consumedCount = 1; if (args.Length() > 1) { const v8::Local<v8::Value> &lastArg = args[args.Length()-1]; diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index ba5b237596..78e9ee9174 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -1296,7 +1296,6 @@ void QQuickPathView::mousePressEvent(QMouseEvent *event) void QQuickPathViewPrivate::handleMousePressEvent(QMouseEvent *event) { - Q_Q(QQuickPathView); if (!interactive || !items.count() || !model || !modelCount) return; velocityBuffer.clear(); |