equal
deleted
inserted
replaced
40 // --------------------------------------------------------------------------- |
40 // --------------------------------------------------------------------------- |
41 // Constructor |
41 // Constructor |
42 // --------------------------------------------------------------------------- |
42 // --------------------------------------------------------------------------- |
43 // |
43 // |
44 IRStationShare::IRStationShare() |
44 IRStationShare::IRStationShare() |
45 : iPlsFilePath(KPlsFilePath) |
45 : iPlsFilePath(KPlsFilePath), |
|
46 iShareDialog(NULL) |
46 { |
47 { |
47 } |
48 } |
48 // --------------------------------------------------------------------------- |
49 // --------------------------------------------------------------------------- |
49 // Destructor |
50 // Destructor |
50 // --------------------------------------------------------------------------- |
51 // --------------------------------------------------------------------------- |
51 // |
52 // |
52 IRStationShare::~IRStationShare() |
53 IRStationShare::~IRStationShare() |
53 { |
54 { |
|
55 delete iShareDialog; |
54 } |
56 } |
55 |
57 |
56 // --------------------------------------------------------------------------- |
58 // --------------------------------------------------------------------------- |
57 // NOTE : MUST ensure no changes to all the elements in the list, |
59 // NOTE : MUST ensure no changes to all the elements in the list, |
58 // so, can ONLY access element via const_iterator |
60 // so, can ONLY access element via const_iterator |
63 if(!constructPlsFile(aPresetList)) |
65 if(!constructPlsFile(aPresetList)) |
64 { |
66 { |
65 return false; |
67 return false; |
66 } |
68 } |
67 |
69 |
68 ShareUi shareDialog; |
70 |
69 QStringList fileList; |
71 QStringList fileList; |
70 fileList.append(iPlsFilePath); |
72 fileList.append(iPlsFilePath); |
71 return shareDialog.send(fileList,true); |
73 if (NULL == iShareDialog) |
|
74 { |
|
75 iShareDialog = new ShareUi(); |
|
76 } |
|
77 return iShareDialog->send(fileList,true); |
72 } |
78 } |
73 |
79 |
74 bool IRStationShare::shareStations(const IRQPreset &aPreset) |
80 bool IRStationShare::shareStations(const IRQPreset &aPreset) |
75 { |
81 { |
76 if(!constructPlsFile(aPreset)) |
82 if(!constructPlsFile(aPreset)) |
77 { |
83 { |
78 return false; |
84 return false; |
79 } |
85 } |
80 |
86 |
81 ShareUi shareDialog; |
|
82 QStringList fileList; |
87 QStringList fileList; |
83 fileList.append(iPlsFilePath); |
88 fileList.append(iPlsFilePath); |
84 return shareDialog.send(fileList,true); |
89 if (NULL == iShareDialog) |
|
90 { |
|
91 iShareDialog = new ShareUi(); |
|
92 } |
|
93 return iShareDialog->send(fileList,true); |
85 } |
94 } |
86 |
95 |
87 // --------------------------------------------------------------------------- |
96 // --------------------------------------------------------------------------- |
88 // constructPlsFile |
97 // constructPlsFile |
89 // NOTE : MUST ensure no changes to all the elements in the list, |
98 // NOTE : MUST ensure no changes to all the elements in the list, |