| 561 | } |
| 562 | |
| 563 | QList<Diff> InlineChatWidgetPrivate::diffText(const QString &str1, const QString &str2) |
| 564 | { |
| 565 | QList<Diff> diffs; |
| 566 | try { |
| 567 | diff_match_patch dmp; |
| 568 | auto a = dmp.diff_linesToChars(str1, str2); |
| 569 | auto lineText1 = a[0].toString(); |
| 570 | auto lineText2 = a[1].toString(); |
| 571 | auto lineArray = a[2].toStringList(); |
| 572 | diffs = dmp.diff_main(lineText1, lineText2, false); |
| 573 | dmp.diff_charsToLines(diffs, lineArray); |
| 574 | } catch (...) { |
| 575 | } |
| 576 | |
| 577 | return diffs; |
| 578 | } |
| 579 | |
| 580 | void InlineChatWidgetPrivate::processGeneratedData(const QString &data) |
| 581 | { |
nothing calls this directly
no test coverage detected