143 |
143 |
144 // Make a local copy of the download object as the object may be |
144 // Make a local copy of the download object as the object may be |
145 // removed from the array before we are finished |
145 // removed from the array before we are finished |
146 download = iDownloadArray[idx]; |
146 download = iDownloadArray[idx]; |
147 |
147 |
148 // In case of error, show a note |
148 // In case of error, show a note. Note that these notes should not |
|
149 // be displayed synchronously, since otherwise other events can |
|
150 // occur that delete objects that are still in use waiting for this |
|
151 // method to complete (see PDOO-7X93JP). |
149 if ( aEvent.iError && aEvent.iError != KErrCancel ) |
152 if ( aEvent.iError && aEvent.iError != KErrCancel ) |
150 { |
153 { |
151 // Download failed, show error note |
154 // Download failed, show error note |
152 if ( aEvent.iError == KErrCouldNotConnect || |
155 if ( aEvent.iError == KErrCouldNotConnect || |
153 aEvent.iError == KErrConnectionTerminated ) |
156 aEvent.iError == KErrConnectionTerminated ) |
154 { // connection error |
157 { // connection error |
155 TFsEmailUiUtility::ShowErrorNoteL( |
158 TFsEmailUiUtility::ShowErrorNoteL( |
156 R_FREESTYLE_EMAIL_ERROR_GENERAL_CONNECTION_ERROR, |
159 R_FREESTYLE_EMAIL_ERROR_GENERAL_CONNECTION_ERROR, |
157 ETrue ); |
160 EFalse ); |
158 } |
161 } |
159 else // other error |
162 else // other error |
160 { |
163 { |
161 TFsEmailUiUtility::ShowErrorNoteL( |
164 TFsEmailUiUtility::ShowErrorNoteL( |
162 R_FREESTYLE_EMAIL_ERROR_GENERAL_UNABLE_TO_COMPLETE, |
165 R_FREESTYLE_EMAIL_ERROR_GENERAL_UNABLE_TO_COMPLETE, |
163 ETrue ); |
166 EFalse ); |
164 } |
167 } |
165 } |
168 } |
166 |
169 |
167 // Remove download from array if it has been cancelled or failed |
170 // Remove download from array if it has been cancelled or failed |
168 if ( aEvent.iProgressStatus == |
171 if ( aEvent.iProgressStatus == |