Commit 5d7f5a2a authored by Tobias Hunger's avatar Tobias Hunger

ProjectNode: Rename path() to filePath()

Change-Id: I78bb73f8c9457fd74c470eacbf54eb9195ac9681
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 6d9ff690
......@@ -275,7 +275,7 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory,
// nodes later.
QHash<QString, Node *> nodeHash;
foreach (Node * node, nodes(m_rootNode))
nodeHash.insert(node->path().toString(), node);
nodeHash.insert(node->filePath().toString(), node);
// Add the sources to the filenode project tree. Sources
// inside the same directory are grouped into a folder-node.
......@@ -356,7 +356,7 @@ void AutotoolsProject::buildFileNodeTree(const QDir &directory,
FolderNode *AutotoolsProject::insertFolderNode(const QDir &nodeDir, QHash<QString, Node *> &nodes)
{
const Utils::FileName nodePath = Utils::FileName::fromString(nodeDir.absolutePath());
QFileInfo rootInfo = m_rootNode->path().toFileInfo();
QFileInfo rootInfo = m_rootNode->filePath().toFileInfo();
const Utils::FileName rootPath = Utils::FileName::fromString(rootInfo.absolutePath());
// Do not create a folder for the root node
......@@ -370,7 +370,7 @@ FolderNode *AutotoolsProject::insertFolderNode(const QDir &nodeDir, QHash<QStrin
// Get parent-folder. If it does not exist, create it recursively.
// Take care that the m_rootNode is considered as top folder.
FolderNode *parentFolder = m_rootNode;
if ((rootPath != folder->path()) && dir.cdUp()) {
if ((rootPath != folder->filePath()) && dir.cdUp()) {
const QString parentDir = dir.absolutePath();
if (!nodes.contains(parentDir)) {
FolderNode *insertedFolder = insertFolderNode(parentDir, nodes);
......
......@@ -729,7 +729,7 @@ QStringList Parser::projectNodeFileList(const FolderNode *node) const
if (file->isGenerated())
continue;
list << file->path().toString();
list << file->filePath().toString();
}
foreach (const FolderNode *folder, subFolderNodes) {
......@@ -754,7 +754,7 @@ QStringList Parser::addProjectNode(const ParserTreeItem::Ptr &item, const Projec
if (!node)
return projectList;
const QString nodePath = node->path().toString();
const QString nodePath = node->filePath().toString();
// our own files
QStringList fileList;
......@@ -768,8 +768,8 @@ QStringList Parser::addProjectNode(const ParserTreeItem::Ptr &item, const Projec
d->cachedPrjFileLists[nodePath] = fileList;
}
if (fileList.count() > 0) {
addProject(item, fileList, node->path().toString());
projectList << node->path().toString();
addProject(item, fileList, node->filePath().toString());
projectList << node->filePath().toString();
}
// subnodes
......@@ -777,7 +777,7 @@ QStringList Parser::addProjectNode(const ParserTreeItem::Ptr &item, const Projec
foreach (const ProjectNode *project, projectNodes) {
ParserTreeItem::Ptr itemPrj(new ParserTreeItem());
SymbolInformation information(project->displayName(), project->path().toString());
SymbolInformation information(project->displayName(), project->filePath().toString());
projectList += addProjectNode(itemPrj, project);
......@@ -798,7 +798,7 @@ QStringList Parser::getAllFiles(const ProjectNode *node)
if (!node)
return fileList;
const QString nodePath = node->path().toString();
const QString nodePath = node->filePath().toString();
CitCachedPrjFileLists cit = d->cachedPrjFileLists.constFind(nodePath);
// try to improve parsing speed by internal cache
......@@ -825,7 +825,7 @@ void Parser::addFlatTree(const ParserTreeItem::Ptr &item, const ProjectNode *nod
fileList.removeDuplicates();
if (fileList.count() > 0) {
addProject(item, fileList, node->path().toString());
addProject(item, fileList, node->filePath().toString());
}
}
......
......@@ -66,7 +66,7 @@ void CMakeCbpParser::sortFiles()
{
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping");
QList<FileName> fileNames = Utils::transform(m_fileList, [] (FileNode *node) {
return node->path();
return node->filePath();
});
Utils::sort(fileNames);
......
......@@ -299,7 +299,7 @@ bool CMakeProject::parseCMakeLists()
if (cbpparser.hasCMakeFiles()) {
fileList.append(cbpparser.cmakeFileList());
foreach (const ProjectExplorer::FileNode *node, cbpparser.cmakeFileList())
projectFiles.insert(node->path());
projectFiles.insert(node->filePath());
} else {
// Manually add the CMakeLists.txt file
FileName cmakeListTxt = projectDirectory().appendPath(QLatin1String("CMakeLists.txt"));
......@@ -312,7 +312,7 @@ bool CMakeProject::parseCMakeLists()
m_files.clear();
foreach (ProjectExplorer::FileNode *fn, fileList)
m_files.append(fn->path().toString());
m_files.append(fn->filePath().toString());
m_files.sort();
buildTree(m_rootNode, fileList);
......@@ -432,7 +432,7 @@ void CMakeProject::gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<Pr
bool sortNodesByPath(Node *a, Node *b)
{
return a->path() < b->path();
return a->filePath() < b->filePath();
}
void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::FileNode *> newList)
......@@ -454,7 +454,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::
foreach (ProjectExplorer::FileNode *fn, added) {
// qDebug()<<"added"<<fn->path();
// Get relative path to rootNode
QString parentDir = fn->path().toFileInfo().absolutePath();
QString parentDir = fn->filePath().toFileInfo().absolutePath();
ProjectExplorer::FolderNode *folder = findOrCreateFolder(rootNode, parentDir);
folder->addFileNodes(QList<ProjectExplorer::FileNode *>()<< fn);
}
......@@ -477,7 +477,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::
ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *rootNode, QString directory)
{
FileName path = rootNode->path().parentDir();
FileName path = rootNode->filePath().parentDir();
QDir rootParentDir(path.toString());
QString relativePath = rootParentDir.relativeFilePath(directory);
if (relativePath == QLatin1String("."))
......@@ -489,7 +489,7 @@ ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *
// Find folder in subFolders
bool found = false;
foreach (ProjectExplorer::FolderNode *folder, parent->subFolderNodes()) {
if (folder->path() == path) {
if (folder->filePath() == path) {
// yeah found something :)
parent = folder;
found = true;
......
......@@ -74,10 +74,10 @@ void QrcFilesVisitor::visitFolderNode(FolderNode *folderNode)
{
foreach (const FileNode *fileNode, folderNode->fileNodes()) {
if (fileNode->fileType() == ResourceType)
m_qrcFiles.append(fileNode->path().toString());
m_qrcFiles.append(fileNode->filePath().toString());
}
if (dynamic_cast<ResourceEditor::ResourceTopLevelNode *>(folderNode))
m_qrcFiles.append(folderNode->path().toString());
m_qrcFiles.append(folderNode->filePath().toString());
}
// ------------ ResourceHandler
......@@ -155,7 +155,7 @@ void ResourceHandler::updateResourcesHelper(bool updateProjectResources)
m_form->setResourceFileSaveMode(QDesignerFormWindowInterface::SaveOnlyUsedResourceFiles);
if (Designer::Constants::Internal::debug)
qDebug() << "ResourceHandler::updateResources()" << fileName
<< " associated with project" << project->rootProjectNode()->path()
<< " associated with project" << project->rootProjectNode()->filePath()
<< " using project qrc files" << projectQrcFiles.size();
} else {
// Use resource file originally used in form
......
......@@ -93,7 +93,7 @@ void GenericProjectNode::refresh(QSet<QString> oldFileList)
QSet<QString> added = newFileList;
added.subtract(oldFileList);
QString baseDir = path().toFileInfo().absolutePath();
QString baseDir = filePath().toFileInfo().absolutePath();
FilesInPathHash filesInPaths = sortFilesIntoPaths(baseDir, added);
FilesInPathHashConstIt cend = filesInPaths.constEnd();
......@@ -131,7 +131,7 @@ void GenericProjectNode::refresh(QSet<QString> oldFileList)
QList<FileNode *> fileNodes;
foreach (const QString &file, it.value()) {
foreach (FileNode *fn, folder->fileNodes()) {
if (fn->path().toString() == file)
if (fn->filePath().toString() == file)
fileNodes.append(fn);
}
}
......@@ -166,7 +166,7 @@ FolderNode *GenericProjectNode::createFolderByName(const QStringList &components
const QString component = components.at(end - 1);
const Utils::FileName folderPath = path().parentDir().appendPath(folderName);
const Utils::FileName folderPath = filePath().parentDir().appendPath(folderName);
FolderNode *folder = new FolderNode(folderPath);
folder->setDisplayName(component);
......@@ -194,9 +194,9 @@ FolderNode *GenericProjectNode::findFolderByName(const QStringList &components,
if (!parent)
return 0;
const QString baseDir = path().toFileInfo().path();
const QString baseDir = filePath().toFileInfo().path();
foreach (FolderNode *fn, parent->subFolderNodes()) {
if (fn->path().toString() == baseDir + QLatin1Char('/') + folderName)
if (fn->filePath().toString() == baseDir + QLatin1Char('/') + folderName)
return fn;
}
return 0;
......
......@@ -135,7 +135,7 @@ void IosRunConfiguration::deviceChanges() {
void IosRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool success,
bool parseInProgress)
{
if (m_profilePath != pro->path())
if (m_profilePath != pro->filePath())
return;
m_parseSuccess = success;
m_parseInProgress = parseInProgress;
......
......@@ -135,7 +135,7 @@ QList<RunConfiguration *> IosRunConfigurationFactory::runConfigurationsForNode(T
QList<RunConfiguration *> result;
foreach (RunConfiguration *rc, t->runConfigurations()) {
if (IosRunConfiguration *qt4c = qobject_cast<IosRunConfiguration *>(rc)) {
if (qt4c->profilePath() == n->path())
if (qt4c->profilePath() == n->filePath())
result << rc;
}
}
......
......@@ -295,11 +295,11 @@ void UpdateIncludeDependenciesVisitor::collectElementPaths(const ProjectExplorer
QMultiHash<QString, Node> *filePathsMap)
{
foreach (const ProjectExplorer::FileNode *fileNode, folderNode->fileNodes()) {
QString elementName = qmt::NameController::convertFileNameToElementName(fileNode->path().toString());
QFileInfo fileInfo(fileNode->path().toString());
QString elementName = qmt::NameController::convertFileNameToElementName(fileNode->filePath().toString());
QFileInfo fileInfo(fileNode->filePath().toString());
QString nodePath = fileInfo.path();
QStringList elementsPath = qmt::NameController::buildElementsPath(nodePath, false);
filePathsMap->insertMulti(elementName, Node(fileNode->path().toString(), elementsPath));
filePathsMap->insertMulti(elementName, Node(fileNode->filePath().toString(), elementsPath));
}
foreach (const ProjectExplorer::FolderNode *subNode, folderNode->subFolderNodes())
collectElementPaths(subNode, filePathsMap);
......@@ -385,10 +385,10 @@ void ComponentViewController::createComponentModel(const ProjectExplorer::Folder
const QString anchorFolder)
{
foreach (const ProjectExplorer::FileNode *fileNode, folderNode->fileNodes()) {
QString componentName = qmt::NameController::convertFileNameToElementName(fileNode->path().toString());
QString componentName = qmt::NameController::convertFileNameToElementName(fileNode->filePath().toString());
qmt::MComponent *component = 0;
bool isSource = false;
CppTools::ProjectFile::Kind kind = CppTools::ProjectFile::classify(fileNode->path().toString());
CppTools::ProjectFile::Kind kind = CppTools::ProjectFile::classify(fileNode->filePath().toString());
switch (kind) {
case CppTools::ProjectFile::CHeader:
case CppTools::ProjectFile::CSource:
......
......@@ -457,9 +457,9 @@ QString ModelIndexer::findFirstModel(ProjectExplorer::FolderNode *folderNode)
{
foreach (ProjectExplorer::FileNode *fileNode, folderNode->fileNodes()) {
Utils::MimeType mimeType = Utils::MimeDatabase().mimeTypeForFile(
fileNode->path().toFileInfo());
fileNode->filePath().toFileInfo());
if (mimeType.name() == QLatin1String(Constants::MIME_TYPE_MODEL))
return fileNode->path().toString();
return fileNode->filePath().toString();
}
foreach (ProjectExplorer::FolderNode *subFolderNode, folderNode->subFolderNodes()) {
QString modelFileName = findFirstModel(subFolderNode);
......
......@@ -139,13 +139,13 @@ void PxNodeController::addExplorerNode(const ProjectExplorer::Node *node,
QTC_ASSERT(diagram, return);
QString elementName = qmt::NameController::convertFileNameToElementName(
node->path().toString());
node->filePath().toString());
switch (node->nodeType()) {
case ProjectExplorer::FileNodeType:
{
QStringList classNames = d->classViewController->findClassDeclarations(
node->path().toString()).toList();
node->filePath().toString()).toList();
auto menu = new QMenu;
menu->addAction(new MenuAction(tr("Add Component %1").arg(elementName), elementName,
MenuAction::TYPE_ADD_COMPONENT, menu));
......
......@@ -76,14 +76,14 @@ QString PxNodeUtilities::calcRelativePath(const ProjectExplorer::Node *node,
switch (node->nodeType()) {
case ProjectExplorer::FileNodeType:
{
QFileInfo fileInfo(node->path().toString());
QFileInfo fileInfo(node->filePath().toString());
nodePath = fileInfo.path();
break;
}
case ProjectExplorer::FolderNodeType:
case ProjectExplorer::VirtualFolderNodeType:
case ProjectExplorer::ProjectNodeType:
nodePath = node->path().toString();
nodePath = node->filePath().toString();
break;
case ProjectExplorer::SessionNodeType:
QTC_ASSERT(false, return QString());
......
......@@ -183,7 +183,7 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
QMessageBox::critical(m_wizard, tr("Failed to Add to Project"),
tr("Failed to add subproject \"%1\"\nto project \"%2\".")
.arg(QDir::toNativeSeparators(generatedProject))
.arg(folder->path().toUserOutput()));
.arg(folder->filePath().toUserOutput()));
return;
}
m_wizard->removeAttributeFromAllFiles(GeneratedFile::OpenProjectAttribute);
......@@ -195,7 +195,7 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
QStringList nativeFilePaths = Utils::transform(filePaths, &QDir::toNativeSeparators);
QMessageBox::critical(wizard(), tr("Failed to Add to Project"),
tr("Failed to add one or more files to project\n\"%1\" (%2).")
.arg(folder->path().toUserOutput(),
.arg(folder->filePath().toUserOutput(),
nativeFilePaths.join(QLatin1String(", "))));
return;
}
......
......@@ -93,10 +93,10 @@ void FindNodesForFileVisitor::visitProjectNode(ProjectNode *node)
void FindNodesForFileVisitor::visitFolderNode(FolderNode *node)
{
if (node->path() == m_path)
if (node->filePath() == m_path)
m_nodes << node;
foreach (FileNode *fileNode, node->fileNodes()) {
if (fileNode->path() == m_path)
if (fileNode->filePath() == m_path)
m_nodes << fileNode;
}
}
......@@ -124,9 +124,9 @@ void FindAllFilesVisitor::visitProjectNode(ProjectNode *projectNode)
void FindAllFilesVisitor::visitFolderNode(FolderNode *folderNode)
{
m_filePaths.append(folderNode->path());
m_filePaths.append(folderNode->filePath());
foreach (const FileNode *fileNode, folderNode->fileNodes())
m_filePaths.append(fileNode->path());
m_filePaths.append(fileNode->filePath());
}
NodesVisitor::~NodesVisitor()
......
......@@ -2081,7 +2081,7 @@ void ProjectExplorerPluginPrivate::runConfigurationConfigurationFinished()
static QString pathOrDirectoryFor(Node *node, bool dir)
{
Utils::FileName path = node->path();
Utils::FileName path = node->filePath();
QString location;
FolderNode *folder = node->asFolderNode();
if (node->nodeType() == VirtualFolderNodeType && folder) {
......@@ -2093,7 +2093,7 @@ static QString pathOrDirectoryFor(Node *node, bool dir)
// Otherwise we figure out a commonPath from the subfolders
QStringList list;
foreach (FolderNode *f, folder->subFolderNodes())
list << f->path().toString() + QLatin1Char('/');
list << f->filePath().toString() + QLatin1Char('/');
location = Utils::commonPath(list);
}
......@@ -3066,7 +3066,7 @@ void ProjectExplorerPluginPrivate::updateContextMenuActions()
m_renameFileAction->setEnabled(actions.contains(Rename));
EditorManager::populateOpenWithMenu(m_openWithMenu,
ProjectTree::currentNode()->path().toString());
ProjectTree::currentNode()->filePath().toString());
}
if (actions.contains(HidePathActions)) {
......@@ -3191,17 +3191,17 @@ void ProjectExplorerPluginPrivate::removeProject()
return;
ProjectNode *projectNode = subProjectNode->parentFolderNode()->asProjectNode();
if (projectNode) {
RemoveFileDialog removeFileDialog(subProjectNode->path().toString(), ICore::mainWindow());
RemoveFileDialog removeFileDialog(subProjectNode->filePath().toString(), ICore::mainWindow());
removeFileDialog.setDeleteFileVisible(false);
if (removeFileDialog.exec() == QDialog::Accepted)
projectNode->removeSubProjects(QStringList() << subProjectNode->path().toString());
projectNode->removeSubProjects(QStringList() << subProjectNode->filePath().toString());
}
}
void ProjectExplorerPluginPrivate::openFile()
{
QTC_ASSERT(ProjectTree::currentNode(), return);
EditorManager::openEditor(ProjectTree::currentNode()->path().toString());
EditorManager::openEditor(ProjectTree::currentNode()->filePath().toString());
}
void ProjectExplorerPluginPrivate::searchOnFileSystem()
......@@ -3229,7 +3229,7 @@ void ProjectExplorerPluginPrivate::removeFile()
FileNode *fileNode = currentNode->asFileNode();
QString filePath = currentNode->path().toString();
QString filePath = currentNode->filePath().toString();
RemoveFileDialog removeFileDialog(filePath, ICore::mainWindow());
if (removeFileDialog.exec() == QDialog::Accepted) {
......@@ -3260,7 +3260,7 @@ void ProjectExplorerPluginPrivate::deleteFile()
FileNode *fileNode = currentNode->asFileNode();
QString filePath = currentNode->path().toString();
QString filePath = currentNode->filePath().toString();
QMessageBox::StandardButton button =
QMessageBox::question(ICore::mainWindow(),
tr("Delete File"),
......@@ -3305,9 +3305,9 @@ void ProjectExplorerPluginPrivate::handleRenameFile()
void ProjectExplorerPlugin::renameFile(Node *node, const QString &newFilePath)
{
QString orgFilePath = node->path().toFileInfo().absoluteFilePath();
QString orgFilePath = node->filePath().toFileInfo().absoluteFilePath();
FolderNode *folderNode = node->parentFolderNode();
QString projectFileName = folderNode->projectNode()->path().fileName();
QString projectFileName = folderNode->projectNode()->filePath().fileName();
if (!folderNode->canRenameFile(orgFilePath, newFilePath)) {
QTimer::singleShot(0, [orgFilePath, newFilePath, projectFileName] {
......
......@@ -199,7 +199,7 @@ bool ProjectFileWizardExtension::processProject(
if (m_context->wizard->kind() == IWizardFactory::ProjectWizard) {
if (!static_cast<ProjectNode *>(folder)->addSubProjects(QStringList(generatedProject))) {
*errorMessage = tr("Failed to add subproject \"%1\"\nto project \"%2\".")
.arg(generatedProject).arg(folder->path().toUserOutput());
.arg(generatedProject).arg(folder->filePath().toUserOutput());
return false;
}
*removeOpenProjectAttribute = true;
......@@ -207,7 +207,7 @@ bool ProjectFileWizardExtension::processProject(
QStringList filePaths = Utils::transform(files, &GeneratedFile::path);
if (!folder->addFiles(filePaths)) {
*errorMessage = tr("Failed to add one or more files to project\n\"%1\" (%2).").
arg(folder->path().toUserOutput(), filePaths.join(QLatin1Char(',')));
arg(folder->filePath().toUserOutput(), filePaths.join(QLatin1Char(',')));
return false;
}
}
......
......@@ -65,8 +65,8 @@ bool sortNodes(Node *n1, Node *n2)
FileNode *file2 = n2->asFileNode();
if (file1 && file1->fileType() == ProjectFileType) {
if (file2 && file2->fileType() == ProjectFileType) {
const QString fileName1 = file1->path().fileName();
const QString fileName2 = file2->path().fileName();
const QString fileName1 = file1->filePath().fileName();
const QString fileName2 = file2->filePath().fileName();
int result = caseFriendlyCompare(fileName1, fileName2);
if (result != 0)
......@@ -91,7 +91,8 @@ bool sortNodes(Node *n1, Node *n2)
if (result != 0)
return result < 0;
result = caseFriendlyCompare(project1->path().toString(), project2->path().toString());
result = caseFriendlyCompare(project1->filePath().toString(),
project2->filePath().toString());
if (result != 0)
return result < 0;
return project1 < project2; // sort by pointer value
......@@ -111,7 +112,8 @@ bool sortNodes(Node *n1, Node *n2)
return true;
if (folder1->priority() < folder2->priority())
return false;
int result = caseFriendlyCompare(folder1->path().toString(), folder2->path().toString());
int result = caseFriendlyCompare(folder1->filePath().toString(),
folder2->filePath().toString());
if (result != 0)
return result < 0;
else
......@@ -130,7 +132,8 @@ bool sortNodes(Node *n1, Node *n2)
FolderNode *folder1 = static_cast<FolderNode*>(n1);
FolderNode *folder2 = static_cast<FolderNode*>(n2);
int result = caseFriendlyCompare(folder1->path().toString(), folder2->path().toString());
int result = caseFriendlyCompare(folder1->filePath().toString(),
folder2->filePath().toString());
if (result != 0)
return result < 0;
else
......@@ -148,11 +151,11 @@ bool sortNodes(Node *n1, Node *n2)
if (result != 0)
return result < 0;
const QString filePath1 = n1->path().toString();
const QString filePath2 = n2->path().toString();
const QString filePath1 = n1->filePath().toString();
const QString filePath2 = n2->filePath().toString();
const QString fileName1 = Utils::FileName::fromString(filePath1).fileName();
const QString fileName2 = Utils::FileName::fromString(filePath2).fileName();
const QString fileName1 = n1->filePath().fileName();
const QString fileName2 = n2->filePath().fileName();
result = caseFriendlyCompare(fileName1, fileName2);
if (result != 0) {
......@@ -272,7 +275,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
break;
}
case Qt::EditRole: {
result = node->path().fileName();
result = node->filePath().fileName();
break;
}
case Qt::ToolTipRole: {
......@@ -283,7 +286,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
if (folderNode)
result = folderNode->icon();
else
result = Core::FileIconProvider::icon(node->path().toString());
result = Core::FileIconProvider::icon(node->filePath().toString());
break;
}
case Qt::FontRole: {
......@@ -294,7 +297,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
break;
}
case Project::FilePathRole: {
result = node->path().toString();
result = node->filePath().toString();
break;
}
case Project::EnabledRole: {
......@@ -336,7 +339,7 @@ bool FlatModel::setData(const QModelIndex &index, const QVariant &value, int rol
Node *node = nodeForIndex(index);
Utils::FileName orgFilePath = node->path();
Utils::FileName orgFilePath = node->filePath();
Utils::FileName newFilePath = orgFilePath.parentDir().appendPath(value.toString());
ProjectExplorerPlugin::renameFile(node, newFilePath.toString());
......@@ -426,7 +429,7 @@ void FlatModel::recursiveAddFileNodes(FolderNode *startNode, QList<Node *> *list
QList<Node*> FlatModel::childNodes(FolderNode *parentNode, const QSet<Node*> &blackList) const
{
qCDebug(logger()) << " FlatModel::childNodes for " << parentNode->path();
qCDebug(logger()) << " FlatModel::childNodes for " << parentNode->filePath();
QList<Node*> nodeList;
if (parentNode->nodeType() == SessionNodeType) {
......@@ -498,7 +501,7 @@ QMimeData *FlatModel::mimeData(const QModelIndexList &indexes) const
foreach (const QModelIndex &index, indexes) {
Node *node = nodeForIndex(index);
if (node->asFileNode())
data->addFile(node->path().toString());
data->addFile(node->filePath().toString());
data->addValue(QVariant::fromValue(node));
}
return data;
......@@ -614,7 +617,7 @@ bool isSorted(const QList<Node *> &nodes)
/// slots and all the fun
void FlatModel::added(FolderNode* parentNode, const QList<Node*> &newNodeList)
{
qCDebug(logger()) << "FlatModel::added" << parentNode->path() << newNodeList.size() << "nodes";
qCDebug(logger()) << "FlatModel::added" << parentNode->filePath() << newNodeList.size() << "nodes";
QModelIndex parentIndex = indexForNode(parentNode);
// Old list
......@@ -650,9 +653,8 @@ void FlatModel::added(FolderNode* parentNode, const QList<Node*> &newNodeList)
if (!emptyDifference.isEmpty()) {
// This should not happen...
qDebug() << "FlatModel::added, old Node list should be subset of newNode list, found files in old list which were not part of new list";
foreach (Node *n, emptyDifference) {
qDebug()<<n->path();
}
foreach (Node *n, emptyDifference)
qDebug()<<n->filePath();
Q_ASSERT(false);
}
......@@ -718,7 +720,7 @@ void FlatModel::added(FolderNode* parentNode, const QList<Node*> &newNodeList)
void FlatModel::removed(FolderNode* parentNode, const QList<Node*> &newNodeList)
{
qCDebug(logger()) << "FlatModel::removed" << parentNode->path() << newNodeList.size() << "nodes";
qCDebug(logger()) << "FlatModel::removed" << parentNode->filePath() << newNodeList.size() << "nodes";
QModelIndex parentIndex = indexForNode(parentNode);
// Old list
QHash<FolderNode*, QList<Node*> >::const_iterator it = m_childNodes.constFind(parentNode);
......@@ -740,9 +742,8 @@ void FlatModel::removed(FolderNode* parentNode, const QList<Node*> &newNodeList)
if (!emptyDifference.isEmpty()) {
// This should not happen...
qDebug() << "FlatModel::removed, new Node list should be subset of oldNode list, found files in new list which were not part of old list";
foreach (Node *n, emptyDifference) {
qDebug()<<n->path();
}
foreach (Node *n, emptyDifference)
qDebug()<<n->filePath();
Q_ASSERT(false);
}
......
......@@ -69,7 +69,7 @@ Node::Node(NodeType nodeType, const Utils::FileName &filePath, int line)
m_line(line),
m_projectNode(0),
m_folderNode(0),
m_path(filePath)
m_filePath(filePath)
{
}
......@@ -91,40 +91,13 @@ void Node::emitNodeSortKeyChanged()
ProjectTree::instance()->emitNodeSortKeyChanged(this);
}
/*!
* The path of the file representing this node.
*