From dda9df2248acf225b4b8cbfd992bebc56d80bad1 Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Mon, 2 Nov 2009 14:30:58 +0100
Subject: [PATCH] Update tool chains correctly when paths are changed in
 options.

The tool chains' "equals" methods where out of date.

Reviewed-by: dt
Reviewed-by: Robert Loehning
---
 src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp   | 7 +++++--
 src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
index e1c009498be..3c467bb1cb8 100644
--- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
@@ -79,7 +79,10 @@ QString GCCEToolChain::makeCommand() const
 
 bool GCCEToolChain::equals(ToolChain *other) const
 {
+    GCCEToolChain *otherGCCE = static_cast<GCCEToolChain *>(other);
     return (other->type() == type()
-            && m_deviceId == static_cast<GCCEToolChain *>(other)->m_deviceId
-            && m_deviceName == static_cast<GCCEToolChain *>(other)->m_deviceName);
+            && m_deviceId == otherGCCE->m_deviceId
+            && m_deviceName == otherGCCE->m_deviceName
+            && m_deviceRoot == otherGCCE->m_deviceRoot
+            && m_gcceCommand == otherGCCE->m_gcceCommand);
 }
diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
index 1a0f6026022..572f1c76fb0 100644
--- a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
@@ -115,7 +115,10 @@ QString WINSCWToolChain::makeCommand() const
 
 bool WINSCWToolChain::equals(ToolChain *other) const
 {
+    WINSCWToolChain *otherWINSCW = static_cast<WINSCWToolChain *>(other);
     return (other->type() == type()
-            && m_deviceId == static_cast<WINSCWToolChain *>(other)->m_deviceId
-            && m_deviceName == static_cast<WINSCWToolChain *>(other)->m_deviceName);
+            && m_deviceId == otherWINSCW->m_deviceId
+            && m_deviceName == otherWINSCW->m_deviceName
+            && m_deviceRoot == otherWINSCW->m_deviceRoot
+            && m_carbidePath == otherWINSCW->m_carbidePath);
 }
-- 
GitLab