diff --git a/cpp/diff_match_patch.cpp b/cpp/diff_match_patch.cpp index 64f270c..2dc0f10 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 f75b1cd..1e4a75d 100644 --- a/cpp/diff_match_patch_test.cpp +++ b/cpp/diff_match_patch_test.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -// Code known to compile and run with Qt 4.3 through Qt 4.7. +// Code known to compile and run with Qt 5 #include #include "diff_match_patch.h" #include "diff_match_patch_test.h" @@ -1055,7 +1055,7 @@ void diff_match_patch_test::assertEquals(const QString &strCase, const QMap