forked from qt-creator/qt-creator
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:
committed by
Tobias Hunger
parent
0bb911f640
commit
1ce8f62cc2
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "qbsproject.h"
|
#include "qbsproject.h"
|
||||||
|
|
||||||
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <qbs.h>
|
#include <qbs.h>
|
||||||
@@ -86,7 +87,10 @@ public:
|
|||||||
if (child->isFile())
|
if (child->isFile())
|
||||||
return;
|
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;
|
node->children = child->children;
|
||||||
|
|
||||||
foreach (FileTreeNode *tmpChild, node->children)
|
foreach (FileTreeNode *tmpChild, node->children)
|
||||||
@@ -108,7 +112,8 @@ public:
|
|||||||
QString p = name;
|
QString p = name;
|
||||||
FileTreeNode *node = parent;
|
FileTreeNode *node = parent;
|
||||||
while (node) {
|
while (node) {
|
||||||
p = node->name + QLatin1Char('/') + p;
|
if (!Utils::HostOsInfo::isWindowsHost() || !node->name.isEmpty())
|
||||||
|
p = node->name + QLatin1Char('/') + p;
|
||||||
node = node->parent;
|
node = node->parent;
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
|
|||||||
Reference in New Issue
Block a user