diff options
author | Ville Nummela <ville.nummela@jolla.com> | 2019-06-18 14:39:38 +0300 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-06-25 11:53:58 +0000 |
commit | 63e418024225f104c7bc51110ac2b12dec4d23ba (patch) | |
tree | 216c7561f1dcc90ee0559340713dad6f6dcbced3 /src/plugins/pythoneditor/pythoneditorplugin.cpp | |
parent | 90ad2797eba573b275514ba487a787cf4036842b (diff) | |
download | qt-creator-63e418024225f104c7bc51110ac2b12dec4d23ba.tar.gz |
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>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditorplugin.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 8dd87ebbda..bae2a90f7b 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -123,7 +123,8 @@ public: bool supportsAction(ProjectAction action, const Node *node) const override; bool addFiles(const QStringList &filePaths, QStringList *) override; - bool removeFiles(const QStringList &filePaths, QStringList *) override; + ProjectExplorer::RemovedFilesFromProject removeFiles(const QStringList &filePaths, + QStringList *) override; bool deleteFiles(const QStringList &) override; bool renameFile(const QString &filePath, const QString &newFilePath) override; @@ -692,9 +693,10 @@ bool PythonProjectNode::addFiles(const QStringList &filePaths, QStringList *) return m_project->addFiles(filePaths); } -bool PythonProjectNode::removeFiles(const QStringList &filePaths, QStringList *) +RemovedFilesFromProject PythonProjectNode::removeFiles(const QStringList &filePaths, QStringList *) { - return m_project->removeFiles(filePaths); + return m_project->removeFiles(filePaths) ? RemovedFilesFromProject::Ok + : RemovedFilesFromProject::Error; } bool PythonProjectNode::deleteFiles(const QStringList &) |