From 275709fb43c154ccb1d95391f4829bd1aecebb12 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Date: Wed, 27 May 2015 20:58:44 +0200
Subject: [PATCH] don't process .prl files recursively

they are self-contained, as they are the result of another project's
full resolution. consequently, recursing them just burns cycles, and
additionally introduces the risk of an endless loop if the file is
botched.

Task-number: QTBUG-12711
Change-Id: I401ee691c170092cc61fe05538cec4272ed8f922
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
---
 qmake/generators/unix/unixmake.cpp     | 2 +-
 qmake/generators/win32/winmakefile.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 723eea80d31..c4750cb8a49 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -612,7 +612,7 @@ UnixMakefileGenerator::processPrlFiles()
             ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
             if(!prl_libs.isEmpty()) {
                 for(int prl = 0; prl < prl_libs.size(); ++prl)
-                    l.insert(lit+prl+1, prl_libs.at(prl).toQString());
+                    l.insert(++lit, prl_libs.at(prl));
                 prl_libs.clear();
             }
         }
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 46a05c52b2d..386e2865fa3 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -234,7 +234,7 @@ Win32MakefileGenerator::processPrlFiles()
             }
             ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
             for (int prl = 0; prl < prl_libs.size(); ++prl)
-                l.insert(lit + prl + 1, prl_libs.at(prl));
+                l.insert(++lit, prl_libs.at(prl));
             prl_libs.clear();
         }
 
-- 
GitLab