From f29e45c082887303561b780f986a896d5aed9b0c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 21 Jul 2017 12:04:45 +0200 Subject: 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 Reviewed-by: Lars Knoll --- examples/quick/scenegraph/sgengine/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/quick') 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(new Item(m_sgRootNode.data(), tex, fromPos, toPos))); + m_items.append(QSharedPointer::create(m_sgRootNode.data(), tex, fromPos, toPos)); } update(); } -- cgit v1.2.3