Mercurial > hg > svcore
comparison base/XmlExportable.cpp @ 1429:48e9f538e6e9
Untabify
| author | Chris Cannam |
|---|---|
| date | Thu, 01 Mar 2018 18:02:22 +0000 |
| parents | 1424aa29ae95 |
| children | f97d64b8674f |
comparison
equal
deleted
inserted
replaced
| 1428:87ae75da6527 | 1429:48e9f538e6e9 |
|---|---|
| 39 | 39 |
| 40 QString | 40 QString |
| 41 XmlExportable::encodeEntities(QString s) | 41 XmlExportable::encodeEntities(QString s) |
| 42 { | 42 { |
| 43 s | 43 s |
| 44 .replace("&", "&") | 44 .replace("&", "&") |
| 45 .replace("<", "<") | 45 .replace("<", "<") |
| 46 .replace(">", ">") | 46 .replace(">", ">") |
| 47 .replace("\"", """) | 47 .replace("\"", """) |
| 48 .replace("'", "'"); | 48 .replace("'", "'"); |
| 49 | 49 |
| 50 return s; | 50 return s; |
| 51 } | 51 } |
| 52 | 52 |
| 53 QString | 53 QString |
| 75 | 75 |
| 76 static std::map<const void *, int> idMap; | 76 static std::map<const void *, int> idMap; |
| 77 static int maxId = 0; | 77 static int maxId = 0; |
| 78 | 78 |
| 79 if (idMap.find(object) == idMap.end()) { | 79 if (idMap.find(object) == idMap.end()) { |
| 80 idMap[object] = maxId++; | 80 idMap[object] = maxId++; |
| 81 } | 81 } |
| 82 | 82 |
| 83 return idMap[object]; | 83 return idMap[object]; |
| 84 } | 84 } |
| 85 | 85 |
