QDeclarativePixmapCache: Add missing enumeration values and break.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Mon, 7 Nov 2011 13:39:56 +0000 (14:39 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 Nov 2011 08:55:01 +0000 (09:55 +0100)
Change-Id: Ia83a4932d50133aaae5d488d7be0df99a75be576
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/qtquick1/util/qdeclarativepixmapcache.cpp

index 0b2e16c..f4420cb 100644 (file)
@@ -602,7 +602,8 @@ private:
     int m_unreferencedCost;
     int m_timerId;
 };
-Q_GLOBAL_STATIC(QDeclarative1PixmapStore, pixmapStore);
+
+Q_GLOBAL_STATIC(QDeclarative1PixmapStore, pixmapStore)
 
 QDeclarative1PixmapStore::QDeclarative1PixmapStore()
 : m_unreferencedPixmaps(0), m_lastUnreferencedPixmap(0), m_unreferencedCost(0), m_timerId(-1)
@@ -790,6 +791,7 @@ static QDeclarative1PixmapData* createPixmapDataSync(QDeclarativeEngine *engine,
                     return new QDeclarative1PixmapData(url, QPixmap::fromImage(image), readSize, requestSize);
                 }
             }
+            break;
             case QDeclarativeImageProvider::Pixmap:
             {
                 QPixmap pixmap = ep->getPixmapFromProvider(url, &readSize, requestSize);
@@ -798,6 +800,10 @@ static QDeclarative1PixmapData* createPixmapDataSync(QDeclarativeEngine *engine,
                     return new QDeclarative1PixmapData(url, pixmap, readSize, requestSize);
                 }
             }
+            break;
+        case QDeclarativeImageProvider::Texture:
+        case QDeclarativeImageProvider::Invalid:
+            break;
         }
 
         // no matching provider, or provider has bad image type, or provider returned null image