Commit 0e29cca4 authored by dt's avatar dt
Browse files

Adding files for generic project get the right directory now.

For folder nodes.

Task-number: QTCREATORBUG-374
Reviewed-by: Thorbjorn
parent cdf2f70c
......@@ -128,6 +128,8 @@ ProjectExplorer::FolderNode *GenericProjectNode::findOrCreateFolderByName(const
if (! end)
return 0;
QString baseDir = QFileInfo(path()).path();
QString folderName;
for (int i = 0; i < end; ++i) {
folderName.append(components.at(i));
......@@ -142,7 +144,8 @@ ProjectExplorer::FolderNode *GenericProjectNode::findOrCreateFolderByName(const
else if (FolderNode *folder = m_folderByName.value(folderName))
return folder;
FolderNode *folder = new FolderNode(component);
FolderNode *folder = new FolderNode(baseDir + "/" + folderName);
folder->setFolderName(component);
m_folderByName.insert(folderName, folder);
FolderNode *parent = findOrCreateFolderByName(components, end - 1);
......
......@@ -117,6 +117,8 @@ ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QStr
if (! end)
return 0;
QString baseDir = QFileInfo(path()).path();
QString folderName;
for (int i = 0; i < end; ++i) {
folderName.append(components.at(i));
......@@ -131,7 +133,9 @@ ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QStr
else if (FolderNode *folder = m_folderByName.value(folderName))
return folder;
FolderNode *folder = new FolderNode(component);
FolderNode *folder = new FolderNode(baseDir + "/" + folderName);
folder->setFolderName(component);
m_folderByName.insert(folderName, folder);
FolderNode *parent = findOrCreateFolderByName(components, end - 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment