Fix gcc compilation warnings
authorKai Koehne <kai.koehne@nokia.com>
Tue, 8 Nov 2011 12:47:50 +0000 (13:47 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 Nov 2011 08:55:01 +0000 (09:55 +0100)
QML_SHOW_FRAMERATE is a leftover from QDeclarativeView. Rest
is signed vs unsigned integer comparison.

Change-Id: Ie17e217fc1cf13d29a3795a40dbbc07e9c7c6067
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/items/qquickview.cpp
src/declarative/qml/qdeclarativesqldatabase.cpp
src/declarative/qml/qdeclarativexmlhttprequest.cpp
src/declarative/qml/v8/qv8listwrapper.cpp

index 80d3a89..bf01a89 100644 (file)
@@ -56,8 +56,6 @@
 
 QT_BEGIN_NAMESPACE
 
-DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE)
-
 void QQuickViewPrivate::init()
 {
     Q_Q(QQuickView);
index 920f835..80464fa 100644 (file)
@@ -217,7 +217,7 @@ static QString qmlsqldatabase_databaseFile(const QString& connectionName, QV8Eng
 
 static v8::Handle<v8::Value> qmlsqldatabase_rows_index(QV8SqlDatabaseResource *r, uint32_t index)
 {
-    if (r->query.at() == index || r->query.seek(index)) {
+    if (r->query.at() == (int)index || r->query.seek(index)) {
 
         QSqlRecord record = r->query.record();
         // XXX optimize
index 0009163..e64088b 100644 (file)
@@ -820,7 +820,7 @@ v8::Handle<v8::Value> NamedNodeMap::indexed(uint32_t index, const v8::AccessorIn
     if (!r || !r->list) return v8::Undefined();
     QV8Engine *engine = V8ENGINE();
 
-    if (index < r->list->count()) {
+    if ((int)index < r->list->count()) {
         return Node::create(engine, r->list->at(index));
     } else {
         return v8::Undefined();
@@ -876,7 +876,7 @@ v8::Handle<v8::Value> NodeList::indexed(uint32_t index, const v8::AccessorInfo&
     if (!r) return v8::Undefined();
     QV8Engine *engine = V8ENGINE();
 
-    if (index < r->d->children.count()) {
+    if ((int)index < r->d->children.count()) {
         return Node::create(engine, r->d->children.at(index));
     } else {
         return v8::Undefined();
index 9c1e320..aa0b82b 100644 (file)
@@ -185,7 +185,7 @@ v8::Handle<v8::Array> QV8ListWrapper::Enumerator(const v8::AccessorInfo &info)
 
     v8::Local<v8::Array> rv = v8::Array::New(count);
 
-    for (int ii = 0; ii < count; ++ii)
+    for (uint ii = 0; ii < count; ++ii)
         rv->Set(ii, v8::Number::New(ii));
 
     return rv;