diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-30 11:31:58 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-07-01 08:34:54 +0200 |
| commit | 91e7009aec8cf6d1b1af46349254313a0622a9ec (patch) | |
| tree | 7c0d0049f5d4bebf165832eba5c2783ce1a6c4ab /examples/quick/scenegraph/customgeometry/beziercurve.cpp | |
| parent | 121de28e01a6a38f0cb69b46bb4d396d793b0474 (diff) | |
Use "auto" as type when initializing using "new"
The type is immediately visible from the right hand side then.
Change-Id: Ifc1a15e3eea9b5a91ff8647f759d207a0ee221b8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/quick/scenegraph/customgeometry/beziercurve.cpp')
| -rw-r--r-- | examples/quick/scenegraph/customgeometry/beziercurve.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/scenegraph/customgeometry/beziercurve.cpp b/examples/quick/scenegraph/customgeometry/beziercurve.cpp index 72fc7e6f1b..97be754f41 100644 --- a/examples/quick/scenegraph/customgeometry/beziercurve.cpp +++ b/examples/quick/scenegraph/customgeometry/beziercurve.cpp @@ -139,7 +139,7 @@ QSGNode *BezierCurve::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) node->setGeometry(geometry); node->setFlag(QSGNode::OwnsGeometry); //! [5] //! [6] - QSGFlatColorMaterial *material = new QSGFlatColorMaterial; + auto *material = new QSGFlatColorMaterial; material->setColor(QColor(255, 0, 0)); node->setMaterial(material); node->setFlag(QSGNode::OwnsMaterial); |
