summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-12 05:17:15 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-12 05:17:15 (GMT)
commitf468cb54e4b9a7f19377ca1e07c313beb71e1025 (patch)
tree651d4d62b37be705f72c52650a107128424ea44f
parent5cdeb08485f3ed49efc3d0b918254e78ad00c84b (diff)
downloadQt-f468cb54e4b9a7f19377ca1e07c313beb71e1025.zip
Qt-f468cb54e4b9a7f19377ca1e07c313beb71e1025.tar.gz
Qt-f468cb54e4b9a7f19377ca1e07c313beb71e1025.tar.bz2
Fix warnings
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader.cpp3
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
-rw-r--r--src/declarative/util/qmllistmodel.cpp1
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<QmlGraphicsItem*>(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<QmlGraphicsItem*>(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<QGraphicsWidget*>(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<s.length()-1; i++) {
if (!s[i].isSpace())
return false;