From 0f1c97ee2e98dd8e1f7a0910eec50392b2d25f8a Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Wed, 15 Sep 2010 11:51:19 +0200
Subject: [PATCH] Fix switching of of shadow building

---
 src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
index 1502a8c04b1..a9b6b2a7db0 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
@@ -250,11 +250,15 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project)
                 info.isTemporary = false;
             }
 
+            QString directory = info.directory;
+            if (!info.isShadowBuild)
+                directory = project->projectDirectory();
+
             // we want to havbe two BCs set up, one to build debug, the other to build release.
             targetInfos.append(BuildConfigurationInfo(info.version, info.buildConfig,
-                                                      info.additionalArguments, info.directory));
+                                                      info.additionalArguments, directory));
             targetInfos.append(BuildConfigurationInfo(info.version, info.buildConfig ^ QtVersion::DebugBuild,
-                                                      info.additionalArguments, info.directory));
+                                                      info.additionalArguments, directory));
         }
 
         // create the target:
-- 
GitLab