From: Friedemann Kleint Date: Thu, 19 Apr 2012 15:24:08 +0000 (+0200) Subject: QtDeclarative: Fix compiler warnings. X-Git-Tag: 071012131707~567 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13ded224ed2c8847101f325e92a7283615f6a73a;p=profile%2Fivi%2Fqtdeclarative.git 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 --- diff --git a/src/qml/qml/qqmlrewrite.cpp b/src/qml/qml/qqmlrewrite.cpp index bbb17b6..83ede94 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 efa10ce..0643981 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 9c570d7..27a3392 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1141,7 +1141,7 @@ v8::Handle 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 &lastArg = args[args.Length()-1]; diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index ba5b237..78e9ee9 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();