equal
deleted
inserted
replaced
197 QString mimeType = info->mimetype(); |
197 QString mimeType = info->mimetype(); |
198 |
198 |
199 if (mimeType.contains(TEXT_MIMETYPE)) { |
199 if (mimeType.contains(TEXT_MIMETYPE)) { |
200 QFile file(info->path()); |
200 QFile file(info->path()); |
201 if (file.open(QIODevice::ReadOnly)) { |
201 if (file.open(QIODevice::ReadOnly)) { |
202 QString textContent(file.readAll()); |
202 QString textContent; |
|
203 QByteArray textArray; |
|
204 textArray = file.readAll(); |
|
205 char *data = new char[textArray.size()+1]; |
|
206 strcpy(data,textArray.data()); |
|
207 //This is needed since MMS text content |
|
208 //is stored in UTF8 format |
|
209 textContent = textContent.fromUtf8(data,strlen(data)); |
|
210 file.close(); |
|
211 delete []data; |
203 setText(textContent); |
212 setText(textContent); |
204 } |
213 } |
205 } |
214 } |
206 else if (mimeType.contains(AUDIO_MIMETYPE)) { |
215 else if (mimeType.contains(AUDIO_MIMETYPE)) { |
207 setAudio(info); |
216 setAudio(info); |