fix source file paths of qbs projects on Windows

Task-number: QBS-238

Change-Id: I8f9279836a10d13998e00dafa830a38748c2aa6a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Joerg Bornemann
2013-03-25 12:03:37 +01:00
committed by Tobias Hunger
parent 0bb911f640
commit 1ce8f62cc2

View File

@@ -31,6 +31,7 @@
#include "qbsproject.h"
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <qbs.h>
@@ -86,7 +87,10 @@ public:
if (child->isFile())
return;
node->name = node->name + QLatin1Char('/') + child->name;
if (!Utils::HostOsInfo::isWindowsHost() || !node->name.isEmpty())
node->name = node->name + QLatin1Char('/') + child->name;
else
node->name = child->name;
node->children = child->children;
foreach (FileTreeNode *tmpChild, node->children)
@@ -108,7 +112,8 @@ public:
QString p = name;
FileTreeNode *node = parent;
while (node) {
p = node->name + QLatin1Char('/') + p;
if (!Utils::HostOsInfo::isWindowsHost() || !node->name.isEmpty())
p = node->name + QLatin1Char('/') + p;
node = node->parent;
}
return p;