diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-19 15:27:32 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-20 07:46:55 +0000 |
commit | 588dbd7a680538d7880fdd5259a3c12a88338a85 (patch) | |
tree | 72bace43a5d02e8278c436ff34fbfe83a0a41cb5 /examples | |
parent | c2edcd013a0671df72eefcbab84fa2941aa22044 (diff) | |
download | qtsvg-588dbd7a680538d7880fdd5259a3c12a88338a85.tar.gz |
BearerCloud example: Fix warning about hiding a virtual functionv5.12.0-beta4v5.12.0-beta3v5.12.0-beta2v5.12.0-beta1
Rename Cloud::advance() to Cloud::advanceAnimation() to avoid a
clash with void QGraphicsItem::advance(int).
Task-number: QTBUG-60653
Change-Id: Iabcc0eab6de3090c5dcc0952f350b060ae542f02
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/svg/network/bearercloud/bearercloud.cpp | 2 | ||||
-rw-r--r-- | examples/svg/network/bearercloud/cloud.cpp | 2 | ||||
-rw-r--r-- | examples/svg/network/bearercloud/cloud.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/svg/network/bearercloud/bearercloud.cpp b/examples/svg/network/bearercloud/bearercloud.cpp index 610764a..0f08aec 100644 --- a/examples/svg/network/bearercloud/bearercloud.cpp +++ b/examples/svg/network/bearercloud/bearercloud.cpp @@ -131,7 +131,7 @@ void BearerCloud::timerEvent(QTimerEvent *) bool cloudsMoved = false; for (Cloud *cloud : clouds) - cloudsMoved |= cloud->advance(); + cloudsMoved |= cloud->advanceAnimation(); if (!cloudsMoved) { killTimer(timerId); diff --git a/examples/svg/network/bearercloud/cloud.cpp b/examples/svg/network/bearercloud/cloud.cpp index 43f6379..4e0313a 100644 --- a/examples/svg/network/bearercloud/cloud.cpp +++ b/examples/svg/network/bearercloud/cloud.cpp @@ -170,7 +170,7 @@ void Cloud::calculateForces() newPos.setY(qMin(qMax(newPos.y(), sceneRect.top() + 10), sceneRect.bottom() - 10)); } -bool Cloud::advance() +bool Cloud::advanceAnimation() { static const qreal scaleDelta = 0.01; diff --git a/examples/svg/network/bearercloud/cloud.h b/examples/svg/network/bearercloud/cloud.h index 2a728d1..a91b994 100644 --- a/examples/svg/network/bearercloud/cloud.h +++ b/examples/svg/network/bearercloud/cloud.h @@ -76,7 +76,7 @@ public: void calculateForces(); - bool advance(); + bool advanceAnimation(); QRectF boundingRect() const override; void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override; |