src/hbcore/image/hbpixmapiconimpl_p.cpp
changeset 28 b7da29130b0e
parent 21 4633027730f5
child 30 80e4d18b72f5
--- a/src/hbcore/image/hbpixmapiconimpl_p.cpp	Thu Sep 02 20:44:51 2010 +0300
+++ b/src/hbcore/image/hbpixmapiconimpl_p.cpp	Fri Sep 17 08:32:10 2010 +0300
@@ -40,13 +40,14 @@
     QPixmap currentPixmap;
 };
 
-HbPixmapIconImpl::HbPixmapIconImpl(HbSharedIconInfo iconData, QString &name,
+HbPixmapIconImpl::HbPixmapIconImpl(HbSharedIconInfo iconData,
+                                   const QString &name,
                                    const QSizeF &keySize,
                                    Qt::AspectRatioMode aspectRatioMode,
                                    QIcon::Mode mode,
                                    bool mirrored,
-                                   HbRenderingMode renderMode):
-    HbIconImpl(iconData,
+                                   HbRenderingMode renderMode)
+    : HbIconImpl(iconData,
                name,
                keySize,
                aspectRatioMode,
@@ -59,16 +60,38 @@
     pixmapIconRenderer = new HbPixmapIconRenderer(pixmapData, this);
 }
 
-HbPixmapIconImpl::HbPixmapIconImpl(const QPixmap &pixmap, const QString &name):
-    pixmapData(pixmap),
+HbPixmapIconImpl::HbPixmapIconImpl(const QPixmap &pixmap,
+                                   const QString &name)
+    : pixmapData(pixmap),
     pixmapIconRenderer(0)
 {
     pixmapIconRenderer = new HbPixmapIconRenderer(pixmapData, this);
+    fileName = name;
+    cacheKeySize = size();
+    renderMode = ESWRendering;
+    createdOnServer = false;
     aspectRatioMode = Qt::KeepAspectRatio;
     mode = QIcon::Normal;
     mirrored = false;
+}
+
+HbPixmapIconImpl::HbPixmapIconImpl(const QPixmap &pixmap,
+                                   const QString &name,
+                                   const QSizeF &keySize,
+                                   Qt::AspectRatioMode aspectRatioMode_,
+                                   QIcon::Mode mode_,
+                                   bool mirrored_)
+    : pixmapData(pixmap),
+      pixmapIconRenderer(0)
+{
+    pixmapIconRenderer = new HbPixmapIconRenderer(pixmapData, this);
+    fileName = name;
+    cacheKeySize = keySize;
+    renderMode = ESWRendering;
     createdOnServer = false;
-    fileName = name;
+    aspectRatioMode = aspectRatioMode_;
+    mode = mode_;
+    mirrored = mirrored_;
 }
 
 HbPixmapIconImpl::~HbPixmapIconImpl()