diff --git a/komparemodellist.cpp b/komparemodellist.cpp --- a/komparemodellist.cpp +++ b/komparemodellist.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -1069,14 +1069,8 @@ int srcLineNo = 1, destLineNo = 1; - const QStringList list = split(fileContents); - QLinkedList lines; - for (const QString& str : list) { - lines.append(str); - } - - QLinkedList::ConstIterator linesIt = lines.begin(); - QLinkedList::ConstIterator lEnd = lines.end(); + const QStringList lines = split(fileContents); + auto linesIt = lines.constBegin(), lEnd = lines.constEnd(); DiffHunkList* hunks = model->hunks(); qCDebug(LIBKOMPAREDIFF2) << "Hunks in hunklist: " << hunks->count();