ProjectExplorer: Add special handling for removing files

... from a project which are pulled in via wildcards.
Such files cannot be removed from a project file, because they are
not listed verbatim. This kind of failure should not be reported to the
user if the file is also deleted, as the file list will have the correct
state after the next reparse.

Fixes: QTCREATORBUG-22586
Done-with: Christian Kandeler <christian.kandeler@qt.io>
Change-Id: I3dc66fe9a6594be7d0b86f46d830cd099ee49fd7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ville Nummela
2019-06-18 14:39:38 +03:00
committed by Christian Kandeler
parent 90ad2797eb
commit 63e4180242
20 changed files with 138 additions and 59 deletions

View File

@@ -143,9 +143,11 @@ public:
return m_project->addFiles(filePaths);
}
bool removeFiles(const QStringList &filePaths, QStringList * = nullptr) override
RemovedFilesFromProject removeFiles(const QStringList &filePaths,
QStringList * = nullptr) override
{
return m_project->removeFiles(filePaths);
return m_project->removeFiles(filePaths) ? RemovedFilesFromProject::Ok
: RemovedFilesFromProject::Error;
}
bool renameFile(const QString &filePath, const QString &newFilePath) override