Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Google-diff-patch-match ported to 5.3 (based on 4.8), having issues with a "compatible with 4.3 to 4.7" compatible function
compiler error I get is
C:\Dev\DiffMatchPatch\diffmatchpatch.cpp:208: error: no matching function for call to 'diff_match_patch::patch_apply(QList<Patch>, QString&)'
QPair<QString, QVector<bool> > out = dmp.patch_apply(dmp.patch_fromText(strPatch), str1);
As you can see around the area i've added, i've tried assigning the var using a different method by breaking it down in pieces, but so far my tests have not been fruitful. Sometimes I can get it to compile, but then the .exe deletes itself if I try to push to my plainTextEdit.
I think it has something to do with the way I'm loading the text file as a readAll() and then trying to feed that into the google-diff-patch-match as a QList of type Patch
btw, I did use a properly formatted exported patch file as my input.
What is the original function signature ?
QPair<QString,QVector<bool> > patch_apply(QList<Patch> &patches, const QString &text);
this is the original function example provided in the header file.
QString str1 = QString("First string in diff");
QString str2 = QString("Second string in diff");
QString strPatch = dmp.patch_toText(dmp.patch_make(str1, str2));
QPair<QString, QVector<bool> > out
= dmp.patch_apply(dmp.patch_fromText(strPatch), str1);
QString strResult = out.first;
throws same error, even when using default strings provided