From 87a929cc9db62f58877bbb5dfea42282d4865d68 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 17 Jan 2018 12:53:59 +0100 Subject: 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 Reviewed-by: Andy Shaw --- src/printsupport/dialogs/qprintdialog_unix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/printsupport') diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp index 3cf78381c0..cac3e9ebcb 100644 --- a/src/printsupport/dialogs/qprintdialog_unix.cpp +++ b/src/printsupport/dialogs/qprintdialog_unix.cpp @@ -619,7 +619,8 @@ static std::vector> pageRangesFromString(const QString &page } // 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 &it1, const std::pair &it2) { return it1.first < it2.first; }); int previousSecond = -1; for (auto pair : result) { if (pair.first <= previousSecond) -- cgit v1.2.3