forked from qt-creator/qt-creator
FolderNodes: Specify filter for Add Existing Directory
Allow foldernodes to specify which files they care for when doing "Add Existing Directory". Before we used a fixed list with C++ header and source files, which does make no sense for e.g. adding to resources. Task-number: QTCREATORBUG-15278 Change-Id: I15dad133391485c2bcebd2d864623304b31b5f8f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
@@ -337,6 +337,8 @@ public:
|
||||
|
||||
QList<ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
QString addFileFilter() const override;
|
||||
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
void refresh(QSet<QString> oldFileList = QSet<QString>());
|
||||
|
||||
@@ -1057,6 +1059,11 @@ QList<ProjectAction> PythonProjectNode::supportedActions(Node *node) const
|
||||
return {};
|
||||
}
|
||||
|
||||
QString PythonProjectNode::addFileFilter() const
|
||||
{
|
||||
return QLatin1String("*.py");
|
||||
}
|
||||
|
||||
bool PythonProjectNode::renameFile(const QString &filePath, const QString &newFilePath)
|
||||
{
|
||||
return m_project->renameFile(filePath, newFilePath);
|
||||
|
||||
Reference in New Issue
Block a user