diff options
author | hjk <hjk@qt.io> | 2021-07-14 16:49:42 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-07-16 13:45:06 +0000 |
commit | 1bde4ddbeca28f33d3c9bcaea6b48851d11444f3 (patch) | |
tree | cae74e01c7b1e68fd79f77c75d8dbd88347e9f50 /src/plugins/python/pythonproject.cpp | |
parent | a58686cf962537624b25a5938d2ca59986d64171 (diff) | |
download | qt-creator-1bde4ddbeca28f33d3c9bcaea6b48851d11444f3.tar.gz |
ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/python/pythonproject.cpp')
-rw-r--r-- | src/plugins/python/pythonproject.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/python/pythonproject.cpp b/src/plugins/python/pythonproject.cpp index e453d5c366..890bcd10fb 100644 --- a/src/plugins/python/pythonproject.cpp +++ b/src/plugins/python/pythonproject.cpp @@ -63,9 +63,9 @@ public: explicit PythonBuildSystem(Target *target); bool supportsAction(Node *context, ProjectAction action, const Node *node) const override; - bool addFiles(Node *, const QStringList &filePaths, QStringList *) override; - RemovedFilesFromProject removeFiles(Node *, const QStringList &filePaths, QStringList *) override; - bool deleteFiles(Node *, const QStringList &) override; + bool addFiles(Node *, const Utils::FilePaths &filePaths, Utils::FilePaths *) override; + RemovedFilesFromProject removeFiles(Node *, const Utils::FilePaths &filePaths, Utils::FilePaths *) override; + bool deleteFiles(Node *, const Utils::FilePaths &) override; bool renameFile(Node *, const Utils::FilePath &oldFilePath, const Utils::FilePath &newFilePath) override; @@ -349,23 +349,23 @@ bool PythonBuildSystem::writePyProjectFile(const QString &fileName, QString &con return true; } -bool PythonBuildSystem::addFiles(Node *, const QStringList &filePaths, QStringList *) +bool PythonBuildSystem::addFiles(Node *, const FilePaths &filePaths, FilePaths *) { QStringList newList = m_rawFileList; const QDir baseDir(projectDirectory().toString()); - for (const QString &filePath : filePaths) - newList.append(baseDir.relativeFilePath(filePath)); + for (const FilePath &filePath : filePaths) + newList.append(baseDir.relativeFilePath(filePath.toString())); return saveRawFileList(newList); } -RemovedFilesFromProject PythonBuildSystem::removeFiles(Node *, const QStringList &filePaths, QStringList *) +RemovedFilesFromProject PythonBuildSystem::removeFiles(Node *, const FilePaths &filePaths, FilePaths *) { QStringList newList = m_rawFileList; - for (const QString &filePath : filePaths) { - const QHash<QString, QString>::iterator i = m_rawListEntries.find(filePath); + for (const FilePath &filePath : filePaths) { + const QHash<QString, QString>::iterator i = m_rawListEntries.find(filePath.toString()); if (i != m_rawListEntries.end()) newList.removeOne(i.value()); } @@ -375,7 +375,7 @@ RemovedFilesFromProject PythonBuildSystem::removeFiles(Node *, const QStringList return res ? RemovedFilesFromProject::Ok : RemovedFilesFromProject::Error; } -bool PythonBuildSystem::deleteFiles(Node *, const QStringList &) +bool PythonBuildSystem::deleteFiles(Node *, const FilePaths &) { return true; } |