From 8b31d429f8d1b3fecf4e499a4640a525c71abe4f Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Thu, 23 Jul 2009 15:36:23 +0200
Subject: [PATCH] Ignore -cache in tests for equivalent argument lists.

QMake contained a bug that -cache something where not copied to the
 # Command comment. So we can't reliable check whether it is still
 the same cache. That should be rarely a problem.
---
 src/plugins/qt4projectmanager/qmakestep.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index 0e441b14766..ed9d8a75d56 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -91,6 +91,14 @@ QStringList QMakeStep::arguments(const QString &buildConfiguration)
     return arguments;
 }
 
+// We match -spec and -platfrom separetly
+// We ignore -cache, because qmake contained a bug that it didn't
+// mention the -cache in the Makefile
+// That means changing the -cache option in the additional arguments
+// does not automatically rerun qmake. Alas, we could try more
+// intelligent matching for -cache, but i guess people rarely
+// do use that.
+
 QStringList removeSpecFromArgumentList(const QStringList &old)
 {
     if (!old.contains("-spec") && !old.contains("-platform"))
@@ -100,7 +108,7 @@ QStringList removeSpecFromArgumentList(const QStringList &old)
     foreach(const QString &item, old) {
         if (ignoreNext) {
             ignoreNext = false;
-        } else if (item == "-spec" || item == "-platform") {
+        } else if (item == "-spec" || item == "-platform" || item == "-cache") {
             ignoreNext = true;
         } else {
             newList << item;
-- 
GitLab