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] == '\\') { if (output[i] == '\\') {
QChar c = output[i + 1]; QChar c = output[i + 1];
if (c == 'n') { switch (c.cell()) {
output[i] == '\n'; case 'n': {
} else if (c == 'r') { output[i] = '\n';
output[i] == '\r'; } break;
} else if (c == 's') {
output[i] == ' '; case 'r': {
} else if (c == '\\') { output[i] = '\r';
output[i] == '\\'; } break;
} else if (c == ':') {
output[i] == ';'; case 's': {
} else { output[i] = ' ';
output[i] = output[i + 1]; } break;
case '\\': {
output[i] = '\\';
} break;
case ':': {
output[i] = ';';
} break;
default: {
output[i] = output[i + 1];
} break;
} }
output[i + 1] = '\0'; output[i + 1] = '\0';
changed = true; changed = true;
i++; i++;