From dcdd15156595dbc317732970e48efa32d32b256a Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 20 May 2009 16:13:00 +0200 Subject: fix compiler warnings --- examples/animation/stickman/node.cpp | 4 ++-- examples/animation/stickman/stickman.cpp | 2 +- examples/statemachine/tankgame/mainwindow.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/animation/stickman/node.cpp b/examples/animation/stickman/node.cpp index ed18108..9c485d9 100644 --- a/examples/animation/stickman/node.cpp +++ b/examples/animation/stickman/node.cpp @@ -75,7 +75,7 @@ QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value) return QGraphicsItem::itemChange(change, value); } -void Node::mousePressEvent(QGraphicsSceneMouseEvent *event) +void Node::mousePressEvent(QGraphicsSceneMouseEvent *) { m_dragging = true; } @@ -86,7 +86,7 @@ void Node::mouseMoveEvent(QGraphicsSceneMouseEvent *event) setPos(mapToParent(event->pos())); } -void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *) { m_dragging = false; } diff --git a/examples/animation/stickman/stickman.cpp b/examples/animation/stickman/stickman.cpp index 5eb392f..e00ea41 100644 --- a/examples/animation/stickman/stickman.cpp +++ b/examples/animation/stickman/stickman.cpp @@ -178,7 +178,7 @@ Node *StickMan::node(int idx) const return 0; } -void StickMan::timerEvent(QTimerEvent *e) +void StickMan::timerEvent(QTimerEvent *) { update(); } diff --git a/examples/statemachine/tankgame/mainwindow.cpp b/examples/statemachine/tankgame/mainwindow.cpp index fcc0325..3437140 100644 --- a/examples/statemachine/tankgame/mainwindow.cpp +++ b/examples/statemachine/tankgame/mainwindow.cpp @@ -201,7 +201,7 @@ void MainWindow::gameOver() TankItem *lastTankStanding = 0; foreach (QGraphicsItem *item, items) { if (GameItem *gameItem = qgraphicsitem_cast(item)) { - if (lastTankStanding = qobject_cast(gameItem)) + if ((lastTankStanding = qobject_cast(gameItem)) != 0) break; } } -- cgit v0.12