QPrintDialog/Unix: compile with gcc 4.8

Passing parameters via auto to a lambda function is a c++14 extension
which is not supported by gcc4.8.

Change-Id: I335b2a2f5ba02f5440c2e7ccc81d4156e8b29484
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
Christian Ehrlicher 2018-01-17 12:53:59 +01:00
parent 1a4cc8d57b
commit 87a929cc9d

View File

@ -619,7 +619,8 @@ static std::vector<std::pair<int, int>> pageRangesFromString(const QString &page
} }
// check no range intersects with the next // check no range intersects with the next
std::sort(result.begin(), result.end(), [](auto it1, auto it2) { return it1.first < it2.first; }); std::sort(result.begin(), result.end(),
[](const std::pair<int, int> &it1, const std::pair<int, int> &it2) { return it1.first < it2.first; });
int previousSecond = -1; int previousSecond = -1;
for (auto pair : result) { for (auto pair : result) {
if (pair.first <= previousSecond) if (pair.first <= previousSecond)