src/hbcore/image/hbframedrawerpool.cpp
changeset 5 627c4a0fd0e7
parent 0 16d8024aca5e
--- a/src/hbcore/image/hbframedrawerpool.cpp	Thu May 27 13:10:59 2010 +0300
+++ b/src/hbcore/image/hbframedrawerpool.cpp	Fri Jun 11 13:58:22 2010 +0300
@@ -44,8 +44,7 @@
 
   \internal
  */
-struct HbFrameDrawerPoolKey
-{
+struct HbFrameDrawerPoolKey {
 public:
     HbFrameDrawerPoolKey(const QString &name,
                          HbFrameDrawer::FrameType type,
@@ -56,8 +55,8 @@
     QSizeF frameSize;
     bool operator==(const HbFrameDrawerPoolKey &other) const {
         return other.frameGraphicsName == frameGraphicsName
-            && other.frameGraphicsType == frameGraphicsType
-            && other.frameSize == frameSize;
+               && other.frameGraphicsType == frameGraphicsType
+               && other.frameSize == frameSize;
     }
 };
 
@@ -66,8 +65,7 @@
 
   \internal
  */
-struct HbFrameDrawerPoolValue
-{
+struct HbFrameDrawerPoolValue {
     HbFrameDrawerPoolValue()
         : frameDrawer(0), refCount(0) { }
     HbFrameDrawerPoolValue(HbFrameDrawer *drawer)
@@ -85,7 +83,7 @@
 Q_GLOBAL_STATIC(HbFrameDrawerPoolData, poolData)
 
 /*!  Returns a new or an existing HbFrameDrawer instance. Ownership of the
-    pointer is NOT transfered to the caller. The returned pointer must never be
+    pointer is NOT transferred to the caller. The returned pointer must never be
     destroyed with delete, use release() instead.
 
     \a frameSize is optional, if the default constructed QSizeF is
@@ -127,7 +125,8 @@
 {
     bool inPool = false;
     HbFrameDrawerPoolData *pool = poolData();
-    foreach (const HbFrameDrawerPoolKey &key, pool->keys()) {
+    QList<HbFrameDrawerPoolKey> keys = pool->keys();
+    foreach(const HbFrameDrawerPoolKey & key, keys) {
         HbFrameDrawerPoolValue value = pool->value(key);
         if (value.frameDrawer == frameDrawer) {
             if (!--value.refCount) {