| 552 | |
| 553 | |
| 554 | void diff_match_patch::diff_charsToLines(QList<Diff> &diffs, |
| 555 | const QStringList &lineArray) { |
| 556 | // Qt has no mutable foreach construct. |
| 557 | QMutableListIterator<Diff> i(diffs); |
| 558 | while (i.hasNext()) { |
| 559 | Diff &diff = i.next(); |
| 560 | QString text; |
| 561 | for (int y = 0; y < diff.text.length(); y++) { |
| 562 | text += lineArray.value(static_cast<ushort>(diff.text[y].unicode())); |
| 563 | } |
| 564 | diff.text = text; |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | |
| 569 | int diff_match_patch::diff_commonPrefix(const QString &text1, |