aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d/qquickcanvasitem.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-20 15:07:40 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-05 10:07:54 +0000
commitf92e22ef299879bf02f1708953e7712729270f8f (patch)
tree547c97775d42f70dda364063b27bb648a6ee4772 /src/quick/items/context2d/qquickcanvasitem.cpp
parenta775e43ae8872e344924581736c0ab933e12510d (diff)
Some cleanups to QQmlRefCount
Rename QQmlRefPointer::take to adopt, as it's a better fit with the semantics. Get rid of the assignment operator from a raw pointer and add a Adopt argument to the constructor. Change-Id: Ia1ebe42b24570f32543e783f91eb3206602772a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/items/context2d/qquickcanvasitem.cpp')
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 2068809b4e..8fa290b953 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -990,7 +990,7 @@ void QQuickCanvasItem::loadImage(const QUrl& url)
if (!d->pixmaps.contains(fullPathUrl)) {
QQuickPixmap* pix = new QQuickPixmap();
QQmlRefPointer<QQuickCanvasPixmap> canvasPix;
- canvasPix.take(new QQuickCanvasPixmap(pix));
+ canvasPix.adopt(new QQuickCanvasPixmap(pix));
d->pixmaps.insert(fullPathUrl, canvasPix);
pix->load(qmlEngine(this)