diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-06-25 19:44:44 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-26 04:18:14 +0200 |
commit | 62d4840011c3b5038402a4b043a7f7f85995b8f3 (patch) | |
tree | 54b8a7e2c182a0e4651f6fcdd25e3cfd2d1cf805 /examples/dbus/remotecontrolledcar | |
parent | a1f9149ac75f08877074d4898399b46943eb9cd2 (diff) |
Replace the QGraphicsItem deprecated transforming functions
The scale(), rotate() and translate() functions are replaced with
QGraphicsItem::setTransform.
Change-Id: Icb81c71b1513c049e2fd607995ca3a868108ee30
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Andreas Aardal Hanssen <andrhans@cisco.com>
Diffstat (limited to 'examples/dbus/remotecontrolledcar')
-rw-r--r-- | examples/dbus/remotecontrolledcar/car/car.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/dbus/remotecontrolledcar/car/car.cpp b/examples/dbus/remotecontrolledcar/car/car.cpp index 4b771c2983..6776784f73 100644 --- a/examples/dbus/remotecontrolledcar/car/car.cpp +++ b/examples/dbus/remotecontrolledcar/car/car.cpp @@ -130,8 +130,8 @@ void Car::timerEvent(QTimerEvent *event) qreal turnRateRads = wheelsAngleRads / turnDistance; // rough estimate qreal turnRate = (turnRateRads * 180) / Pi; qreal rotation = speed * turnRate; - - rotate(rotation); - translate(0, -speed); + + setTransform(QTransform().rotate(rotation), true); + setTransform(QTransform::fromTranslate(0, -speed), true); update(); } |