qtinternetradio/ui/src/irstationshare.cpp
branchGCC_SURGE
changeset 13 c9471d26c7f2
parent 8 3b03c28289e6
--- a/qtinternetradio/ui/src/irstationshare.cpp	Mon Jun 21 22:33:45 2010 +0100
+++ b/qtinternetradio/ui/src/irstationshare.cpp	Thu Jul 22 16:31:41 2010 +0100
@@ -42,7 +42,8 @@
 // ---------------------------------------------------------------------------
 //
 IRStationShare::IRStationShare()
-            : iPlsFilePath(KPlsFilePath)
+            : iPlsFilePath(KPlsFilePath),
+              iShareDialog(NULL)
 {
 }             
 // ---------------------------------------------------------------------------
@@ -51,6 +52,7 @@
 //
 IRStationShare::~IRStationShare()
 {
+    delete iShareDialog;
 }
 
 // ---------------------------------------------------------------------------
@@ -65,10 +67,14 @@
         return false;
     }
     
-    ShareUi shareDialog;
+
     QStringList fileList;
     fileList.append(iPlsFilePath);
-    return shareDialog.send(fileList,true);
+    if (NULL == iShareDialog)
+    {
+        iShareDialog = new ShareUi();
+    }    
+    return iShareDialog->send(fileList,true);
 }
 
 bool IRStationShare::shareStations(const IRQPreset &aPreset)
@@ -78,10 +84,13 @@
         return false;
     }
     
-    ShareUi shareDialog;
     QStringList fileList;
     fileList.append(iPlsFilePath);
-    return shareDialog.send(fileList,true);
+    if (NULL == iShareDialog)
+    {
+        iShareDialog = new ShareUi();
+    }      
+    return iShareDialog->send(fileList,true);
 }
 
 // ---------------------------------------------------------------------------