summaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-07-21 12:04:45 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-07-31 13:21:13 +0000
commitf29e45c082887303561b780f986a896d5aed9b0c (patch)
tree24daf774d0848f4cd4838bbb44494a15e832b294 /examples/quick
parent80e03bbd9a42401d50af450aff5351c3a0c95444 (diff)
Use QSharedPointer::create() more
This is the result of running the (experimental) clang-tidy check qt-modernize-qsharedpointer-create Discarded changes: none. Change-Id: I385c99af3822bc478d94a87679dfafde3ded504e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/scenegraph/sgengine/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/scenegraph/sgengine/window.cpp b/examples/quick/scenegraph/sgengine/window.cpp
index 759bbf1fcd..a73d9bf755 100644
--- a/examples/quick/scenegraph/sgengine/window.cpp
+++ b/examples/quick/scenegraph/sgengine/window.cpp
@@ -173,7 +173,7 @@ void Window::addItems()
QSGTexture *tex = textures[i%2];
QPointF fromPos(-tex->textureSize().width(), qrand() / float(RAND_MAX) * (height() - tex->textureSize().height()));
QPointF toPos(width(), qrand() / float(RAND_MAX) * height() * 1.5 - height() * 0.25);
- m_items.append(QSharedPointer<Item>(new Item(m_sgRootNode.data(), tex, fromPos, toPos)));
+ m_items.append(QSharedPointer<Item>::create(m_sgRootNode.data(), tex, fromPos, toPos));
}
update();
}