diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
index 3e271c701709311cb5f2339ad19f1484ab0a7c3d..09e1827c7a1feea4d1417137a29efcc8176a8a1f 100644
--- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
@@ -314,8 +314,10 @@ void Qt4RunConfiguration::updateTarget()
     }
 
     // Extract data
-    QString relSubDir = QFileInfo(project()->file()->fileName()).absoluteDir().relativeFilePath(QFileInfo(m_proFilePath).path());
-    QString baseDir = QDir(project()->buildDirectory(project()->activeBuildConfiguration())).absoluteFilePath(relSubDir);
+    QDir baseProjectDirectory = QFileInfo(project()->file()->fileName()).absoluteDir();
+    QString relSubDir = baseProjectDirectory.relativeFilePath(QFileInfo(m_proFilePath).path());
+    QDir baseBuildDirectory = project()->buildDirectory(project()->activeBuildConfiguration());
+    QString baseDir = baseBuildDirectory.absoluteFilePath(relSubDir);
 
     //qDebug()<<relSubDir<<baseDir;