Silence compiler warnings about unused variables (MSVC)

Fixes most  'C4189: local variable is initialized but not referenced' warnings

Change-Id: I8c5a1ba0a50dd3fcb22294e564425846362ee911
Reviewed-by: Martin Jones <martin.jones@nokia.com>
This commit is contained in:
Kai Koehne 2011-11-17 10:47:36 +01:00 committed by Qt by Nokia
parent eeadfe200d
commit d7a5727d69
8 changed files with 18 additions and 6 deletions

View File

@ -3212,9 +3212,10 @@ void QQuickItem::setState(const QString &state)
QDeclarativeListProperty<QQuickTransform> QQuickItem::transform()
{
Q_D(QQuickItem);
return QDeclarativeListProperty<QQuickTransform>(this, 0, d->transform_append, d->transform_count,
d->transform_at, d->transform_clear);
return QDeclarativeListProperty<QQuickTransform>(this, 0, QQuickItemPrivate::transform_append,
QQuickItemPrivate::transform_count,
QQuickItemPrivate::transform_at,
QQuickItemPrivate::transform_clear);
}
void QQuickItem::classBegin()

View File

@ -586,6 +586,7 @@ QQuickItem *QQuickShaderEffectSource::sourceItem() const
void QQuickShaderEffectSource::itemGeometryChanged(QQuickItem *item, const QRectF &newRect, const QRectF &oldRect)
{
Q_ASSERT(item == m_sourceItem);
Q_UNUSED(item);
if (newRect.size() != oldRect.size())
update();
}

View File

@ -1107,6 +1107,7 @@ void QDeclarativeComponent::incubateObject(QDeclarativeV8Function *args)
{
Q_D(QDeclarativeComponent);
Q_ASSERT(d->engine);
Q_UNUSED(d);
Q_ASSERT(args);
QObject *parent = 0;

View File

@ -129,6 +129,8 @@ inline static void qt_debug_add_texture(QSGTexture* texture)
item->backTraceSize = backtrace(item->backTrace, BACKTRACE_SIZE);
qt_debug_allocated_textures.insert(texture, item);
}
#else
Q_UNUSED(texture);
#endif // Q_OS_LINUX
++qt_debug_texture_count;
@ -150,6 +152,8 @@ static void qt_debug_remove_texture(QSGTexture* texture)
delete item;
}
}
#else
Q_UNUSED(texture)
#endif
--qt_debug_texture_count;

View File

@ -552,6 +552,7 @@ QPointF QDeclarativePath::forwardsPointAt(const QPainterPath &path, const qreal
while (spc > epc) {
Q_ASSERT(!(currElement > lastElement));
Q_UNUSED(lastElement);
currBez = nextBezier(path, &currElement, &bezLength);
currLength += bezLength;
epc = currLength / pathLength;
@ -606,6 +607,7 @@ QPointF QDeclarativePath::backwardsPointAt(const QPainterPath &path, const qreal
while (spc < epc) {
Q_ASSERT(!(currElement < firstElement));
Q_UNUSED(firstElement);
currBez = nextBezier(path, &currElement, &bezLength, true /*reverse*/);
currLength = prevLength;
prevLength = currLength - bezLength;

View File

@ -53,6 +53,7 @@ public:
virtual void registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt"));
Q_UNUSED(uri);
QDeclarativeQtQuick1Module::defineModule(QDeclarativeQtQuick1Module::Qt47);
}
};

View File

@ -53,6 +53,7 @@ public:
virtual void registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick"));
Q_UNUSED(uri);
QDeclarativeQtQuick1Module::defineModule(QDeclarativeQtQuick1Module::QtQuick1);
}
};

View File

@ -2950,9 +2950,10 @@ void QDeclarativeItemPrivate::setState(const QString &state)
/*! \internal */
QDeclarativeListProperty<QGraphicsTransform> QDeclarativeItem::transform()
{
Q_D(QDeclarativeItem);
return QDeclarativeListProperty<QGraphicsTransform>(this, 0, d->transform_append, d->transform_count,
d->transform_at, d->transform_clear);
return QDeclarativeListProperty<QGraphicsTransform>(this, 0, QDeclarativeItemPrivate::transform_append,
QDeclarativeItemPrivate::transform_count,
QDeclarativeItemPrivate::transform_at,
QDeclarativeItemPrivate::transform_clear);
}
/*!