equal
deleted
inserted
replaced
73 // Constants |
73 // Constants |
74 const QString SEND_ICON("qtg_mono_send"); |
74 const QString SEND_ICON("qtg_mono_send"); |
75 const QString ATTACH_ICON("qtg_mono_attach"); |
75 const QString ATTACH_ICON("qtg_mono_attach"); |
76 // temporary folder for unieditor |
76 // temporary folder for unieditor |
77 const QString UNIFIED_EDITOR_TEMP_FOLDER("unifiededitor"); |
77 const QString UNIFIED_EDITOR_TEMP_FOLDER("unifiededitor"); |
|
78 // invalid chars in vcard |
|
79 const QString INVALID_FILENAME_CHARS("[?*<>/\"|\\:]"); |
|
80 // replacement char for invalid char |
|
81 const QChar REPLACE_CHAR('_'); |
78 |
82 |
79 const int INVALID_MSGID = -1; |
83 const int INVALID_MSGID = -1; |
80 // vcard file extn. |
84 // vcard file extn. |
81 const QString FILE_EXTN(".vcf"); |
85 const QString FILE_EXTN(".vcf"); |
82 // Max vcards inside a msg. Using a very large number. |
86 // Max vcards inside a msg. Using a very large number. |
1344 writer->startWriting(currDoc); |
1348 writer->startWriting(currDoc); |
1345 if(writer->waitForFinished()) |
1349 if(writer->waitForFinished()) |
1346 { |
1350 { |
1347 // generate file name |
1351 // generate file name |
1348 QString displayLabel = contactList.at(i).displayLabel(); |
1352 QString displayLabel = contactList.at(i).displayLabel(); |
|
1353 displayLabel.replace(QRegExp(INVALID_FILENAME_CHARS), REPLACE_CHAR); |
1349 QString filepath = generateFileName(displayLabel); |
1354 QString filepath = generateFileName(displayLabel); |
|
1355 |
|
1356 // create file |
1350 QFile file(filepath); |
1357 QFile file(filepath); |
1351 if(file.open(QIODevice::WriteOnly)) |
1358 if(file.open(QIODevice::WriteOnly)) |
1352 { |
1359 { |
1353 // trap ignore so that, incase of multiselection, other vcards are still created |
1360 // trap ignore so that, incase of multiselection, other vcards are still created |
1354 QByteArray bufArr; |
1361 QByteArray bufArr; |