Improve QQuickImageResponse::textureFactory documentation
authorAlbert Astals Cid <albert.astals@canonical.com>
Fri, 14 Aug 2015 12:51:34 +0000 (14:51 +0200)
committerAlbert Astals Cid <albert.astals@canonical.com>
Wed, 19 Aug 2015 10:47:22 +0000 (10:47 +0000)
Change-Id: Id754f1f1454af566cb3cf20f5ca947f972ef2caf
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
src/quick/util/qquickimageprovider.cpp

index 89615a2..5d492a4 100644 (file)
@@ -194,8 +194,11 @@ void QQuickImageResponse::cancel()
     \fn QQuickTextureFactory *QQuickImageResponse::textureFactory() const
 
     Returns the texture factory for the job. You can use QQuickTextureFactory::textureFactoryForImage
-    if your provider works with QImage. This method is only called when the error string is not empty and the
-    engine takes ownership of the returned QQuickTextureFactory.
+    if your provider works with QImage. The engine takes ownership of the returned QQuickTextureFactory.
+
+     \note This method will be called only when needed. For example, it may not be called if there is an
+     error or the job is cancelled. Therefore, allocate the QQuickTextureFactory instance only in this
+     method or otherwise ensure its deletion.
  */