forked from qt-creator/qt-creator
ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -500,20 +500,20 @@ bool QmlBuildSystem::forceFreeType() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool QmlBuildSystem::addFiles(Node *context, const QStringList &filePaths, QStringList *)
|
||||
bool QmlBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FilePaths *)
|
||||
{
|
||||
if (!dynamic_cast<QmlProjectNode *>(context))
|
||||
return false;
|
||||
|
||||
QStringList toAdd;
|
||||
foreach (const QString &filePath, filePaths) {
|
||||
if (!m_projectItem.data()->matchesFile(filePath))
|
||||
FilePaths toAdd;
|
||||
for (const FilePath &filePath : filePaths) {
|
||||
if (!m_projectItem.data()->matchesFile(filePath.toString()))
|
||||
toAdd << filePaths;
|
||||
}
|
||||
return toAdd.isEmpty();
|
||||
}
|
||||
|
||||
bool QmlBuildSystem::deleteFiles(Node *context, const QStringList &filePaths)
|
||||
bool QmlBuildSystem::deleteFiles(Node *context, const FilePaths &filePaths)
|
||||
{
|
||||
if (dynamic_cast<QmlProjectNode *>(context))
|
||||
return true;
|
||||
|
||||
@@ -54,9 +54,9 @@ public:
|
||||
ProjectExplorer::ProjectAction action,
|
||||
const ProjectExplorer::Node *node) const override;
|
||||
bool addFiles(ProjectExplorer::Node *context,
|
||||
const QStringList &filePaths, QStringList *notAdded = nullptr) override;
|
||||
const Utils::FilePaths &filePaths, Utils::FilePaths *notAdded = nullptr) override;
|
||||
bool deleteFiles(ProjectExplorer::Node *context,
|
||||
const QStringList &filePaths) override;
|
||||
const Utils::FilePaths &filePaths) override;
|
||||
bool renameFile(ProjectExplorer::Node *context,
|
||||
const Utils::FilePath &oldFilePath, const Utils::FilePath &newFilePath) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user