From f468cb54e4b9a7f19377ca1e07c313beb71e1025 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 12 Feb 2010 15:17:15 +1000 Subject: Fix warnings --- src/declarative/debugger/qpacketprotocol.cpp | 2 +- src/declarative/graphicsitems/qmlgraphicsloader.cpp | 3 --- src/declarative/qml/qmlcompiler.cpp | 2 +- src/declarative/util/qmllistmodel.cpp | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index b76c461..fb07c62 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -165,7 +165,7 @@ public Q_SLOTS: { if(-1 == inProgressSize) { // We need a size header of sizeof(qint32) - if(sizeof(qint32) > dev->bytesAvailable()) + if(sizeof(qint32) > (uint)dev->bytesAvailable()) return; // Read size header diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index d0b804b..b3486ef 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -93,7 +93,6 @@ void QmlGraphicsLoaderPrivate::clear() void QmlGraphicsLoaderPrivate::initResize() { Q_Q(QmlGraphicsLoader); - QmlGraphicsItem *resizeItem = 0; if (QmlGraphicsItem *qmlItem = qobject_cast(item)) { if (resizeMode == QmlGraphicsLoader::SizeLoaderToItem) { QmlGraphicsItemPrivate *p = @@ -389,7 +388,6 @@ void QmlGraphicsLoader::setResizeMode(ResizeMode mode) if (mode == d->resizeMode) return; - QmlGraphicsItem *resizeItem = 0; if (QmlGraphicsItem *qmlItem = qobject_cast(d->item)) { if (d->resizeMode == SizeLoaderToItem) { QmlGraphicsItemPrivate *p = @@ -397,7 +395,6 @@ void QmlGraphicsLoader::setResizeMode(ResizeMode mode) p->removeItemChangeListener(d, QmlGraphicsItemPrivate::Geometry); } } else if (d->item && d->item->isWidget()) { - QGraphicsWidget *widget = static_cast(d->item); if (d->resizeMode == SizeLoaderToItem) d->item->removeEventFilter(this); } diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 26ebd27..10150de 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -126,7 +126,7 @@ bool QmlCompiler::isValidId(const QString &val) // TODO this will be enforced and return false if (val.at(0).isLetter() && !val.at(0).isLower()) { //return false; - qWarning() << "id '" + val + "' is invalid: ids cannot start with uppercase letters. This will be enforced in an upcoming version of QML."; + qWarning().nospace() << "id '" << val << "' is invalid: ids cannot start with uppercase letters. This will be enforced in an upcoming version of QML."; } QChar u(QLatin1Char('_')); diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 0b19574..61fc50d 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -922,7 +922,6 @@ void QmlListModelParser::setCustomData(QObject *obj, const QByteArray &d) bool QmlListModelParser::definesEmptyList(const QString &s) { if (s.startsWith(QLatin1Char('[')) && s.endsWith(QLatin1Char(']'))) { - bool isEmptyList = true; for (int i=1; i