fix ParseTagString function

This commit is contained in:
Rasmus Karlsson 2017-12-17 00:56:33 +01:00
parent 6b46d12558
commit 8687d01cea

View file

@ -15,19 +15,32 @@ QString ParseTagString(const QString &input)
if (output[i] == '\\') {
QChar c = output[i + 1];
if (c == 'n') {
output[i] == '\n';
} else if (c == 'r') {
output[i] == '\r';
} else if (c == 's') {
output[i] == ' ';
} else if (c == '\\') {
output[i] == '\\';
} else if (c == ':') {
output[i] == ';';
} else {
switch (c.cell()) {
case 'n': {
output[i] = '\n';
} break;
case 'r': {
output[i] = '\r';
} break;
case 's': {
output[i] = ' ';
} break;
case '\\': {
output[i] = '\\';
} break;
case ':': {
output[i] = ';';
} break;
default: {
output[i] = output[i + 1];
} break;
}
output[i + 1] = '\0';
changed = true;
i++;