| 74 | } |
| 75 | |
| 76 | QString unescape(QString orig) |
| 77 | { |
| 78 | QString out; |
| 79 | QChar prev = QChar::Null; |
| 80 | for (auto c : orig) { |
| 81 | if (prev == '\\') { |
| 82 | if (c == 'n') |
| 83 | out += '\n'; |
| 84 | else if (c == 't') |
| 85 | out += '\t'; |
| 86 | else if (c == '#') |
| 87 | out += '#'; |
| 88 | else |
| 89 | out += c; |
| 90 | prev = QChar::Null; |
| 91 | } else { |
| 92 | if (c == '\\') { |
| 93 | prev = c; |
| 94 | continue; |
| 95 | } |
| 96 | out += c; |
| 97 | prev = QChar::Null; |
| 98 | } |
| 99 | } |
| 100 | return out; |
| 101 | } |
| 102 | |
| 103 | QString unquote(QString str) |
| 104 | { |
no outgoing calls
no test coverage detected