diff options
author | Charles Yin <charles.yin@nokia.com> | 2012-05-04 11:18:08 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-04 08:47:22 +0200 |
commit | 4b69c1ad76d86f4c197e6b32e64eb1a4f75c03f7 (patch) | |
tree | 8f979e67023affd56d0bab2fd05f7ee6e506fd8d /src/quick/items/context2d | |
parent | 05f7732f81abaa2d50f595d155e827501fed8d95 (diff) |
Add more warnings
renderTaraget and renderStrategy are not allowed to be modified once
context was initialized.
Change-Id: Ic0aa493b4e686a063c318a1d1ec912c176e47ed4
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/items/context2d')
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 7673c39400..c98c4bc7a6 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -428,8 +428,10 @@ void QQuickCanvasItem::setRenderTarget(QQuickCanvasItem::RenderTarget target) { Q_D(QQuickCanvasItem); if (d->renderTarget != target) { - if (d->contextInitialized) // target not changeable once context is active + if (d->contextInitialized) { + qmlInfo(this) << "Canvas:renderTarget not changeble once context is active."; return; + } d->renderTarget = target; emit renderTargetChanged(); @@ -470,8 +472,10 @@ void QQuickCanvasItem::setRenderStrategy(QQuickCanvasItem::RenderStrategy strate { Q_D(QQuickCanvasItem); if (d->renderStrategy != strategy) { - if (d->contextInitialized) // Render strategy not changeable once context is active + if (d->contextInitialized) { + qmlInfo(this) << "Canvas:renderStrategy not changeable once context is active."; return; + } d->renderStrategy = strategy; emit renderStrategyChanged(); |