Skip to content

Commit

Permalink
Fix error message from showing when adding, remove and renaming files
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed May 21, 2019
1 parent 2527247 commit d2b7370
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/project_manager/ros_project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
// ROSProject
//
////////////////////////////////////////////////////////////////////////////////////
const int UPDATE_INTERVAL = 300;
const int UPDATE_INTERVAL = 1000;

ROSProject::ROSProject(const Utils::FileName &fileName) :
ProjectExplorer::Project(Constants::ROS_MIME_TYPE, fileName, [this]() { refresh(); }),
Expand Down
24 changes: 24 additions & 0 deletions src/project_manager/ros_project_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,30 @@ bool ROSProjectNode::supportsAction(ProjectExplorer::ProjectAction action, const
}
}

bool ROSProjectNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
{
ProjectExplorer::ProjectNode::addFiles(filePaths, notAdded);
return true;
}

bool ROSProjectNode::removeFiles(const QStringList &filePaths, QStringList *notRemoved)
{
ProjectExplorer::ProjectNode::removeFiles(filePaths, notRemoved);
return true;
}

bool ROSProjectNode::deleteFiles(const QStringList &filePaths)
{
ProjectExplorer::ProjectNode::deleteFiles(filePaths);
return true;
}

bool ROSProjectNode::renameFile(const QString &filePath, const QString &newFilePath)
{
ProjectExplorer::ProjectNode::renameFile(filePath, newFilePath);
return true;
}

ROSFolderNode::ROSFolderNode(const Utils::FileName &folderPath, const QString &displayName) : FolderNode(folderPath, ProjectExplorer::NodeType::Folder, displayName), m_repository(nullptr)
{
QString path = this->filePath().toString();
Expand Down
8 changes: 8 additions & 0 deletions src/project_manager/ros_project_nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ class ROSProjectNode : public ProjectExplorer::ProjectNode

bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override;

bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override;

bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override;

bool deleteFiles(const QStringList &filePaths) override;

bool renameFile(const QString &filePath, const QString &newFilePath) override;

private:
static ProjectExplorer::FileNode *findFileNode(FolderNode *folder_node, const Utils::FileName &filePaths);
};
Expand Down

0 comments on commit d2b7370

Please sign in to comment.