forked from qt-creator/qt-creator
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:
committed by
Christian Kandeler
parent
90ad2797eb
commit
63e4180242
@@ -705,12 +705,12 @@ bool FolderNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FolderNode::removeFiles(const QStringList &filePaths, QStringList *notRemoved)
|
||||
RemovedFilesFromProject FolderNode::removeFiles(const QStringList &filePaths,
|
||||
QStringList *notRemoved)
|
||||
{
|
||||
ProjectNode *pn = managingProject();
|
||||
if (pn)
|
||||
if (ProjectNode * const pn = managingProject())
|
||||
return pn->removeFiles(filePaths, notRemoved);
|
||||
return false;
|
||||
return RemovedFilesFromProject::Error;
|
||||
}
|
||||
|
||||
bool FolderNode::deleteFiles(const QStringList &filePaths)
|
||||
@@ -848,11 +848,12 @@ bool ProjectNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ProjectNode::removeFiles(const QStringList &filePaths, QStringList *notRemoved)
|
||||
RemovedFilesFromProject ProjectNode::removeFiles(const QStringList &filePaths,
|
||||
QStringList *notRemoved)
|
||||
{
|
||||
Q_UNUSED(filePaths)
|
||||
Q_UNUSED(notRemoved)
|
||||
return false;
|
||||
return RemovedFilesFromProject::Error;
|
||||
}
|
||||
|
||||
bool ProjectNode::deleteFiles(const QStringList &filePaths)
|
||||
|
||||
Reference in New Issue
Block a user