diff --git a/cpp/diff_match_patch.cpp b/cpp/diff_match_patch.cpp index 64f270c3..2dc0f10f 100644 --- a/cpp/diff_match_patch.cpp +++ b/cpp/diff_match_patch.cpp @@ -1383,7 +1383,7 @@ QList diff_match_patch::diff_fromDelta(const QString &text1, // Each token begins with a one character parameter which specifies the // operation of this token (delete, insert, equality). QString param = safeMid(token, 1); - switch (token[0].toAscii()) { + switch (token[0].toLatin1()) { case '+': param = QUrl::fromPercentEncoding(qPrintable(param)); diffs.append(Diff(INSERT, param)); @@ -2074,7 +2074,7 @@ QList diff_match_patch::patch_fromText(const QString &textline) { text.removeFirst(); continue; } - sign = text.front()[0].toAscii(); + sign = text.front()[0].toLatin1(); line = safeMid(text.front(), 1); line = line.replace("+", "%2B"); // decode would change all "+" to " " line = QUrl::fromPercentEncoding(qPrintable(line)); diff --git a/cpp/diff_match_patch_test.cpp b/cpp/diff_match_patch_test.cpp index f75b1cd0..0b914c9f 100644 --- a/cpp/diff_match_patch_test.cpp +++ b/cpp/diff_match_patch_test.cpp @@ -1055,7 +1055,7 @@ void diff_match_patch_test::assertEquals(const QString &strCase, const QMap