From 89c9eed127977f2ddb5409ba7aefeefe51f64fa7 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 28 Feb 2019 16:45:00 +0100 Subject: ProjectExplorer: De-virtualize FolderNode::addFileFilter ... which interestingly enough is only used with Add Existing Directory, not with Add Existing Files. Change-Id: If76ba5f192dc49f3cb56e3d0c9ab249e47aa1c28 Reviewed-by: Christian Kandeler --- src/plugins/pythoneditor/pythoneditorplugin.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp') diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 57db21346c..6abb9146ca 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -116,7 +116,6 @@ public: PythonProjectNode(PythonProject *project); bool showInSimpleTree() const override; - QString addFileFilter() const override; bool supportsAction(ProjectAction action, const Node *node) const override; bool addFiles(const QStringList &filePaths, QStringList *) override; bool removeFiles(const QStringList &filePaths, QStringList *) override; @@ -585,6 +584,7 @@ PythonProjectNode::PythonProjectNode(PythonProject *project) , m_project(project) { setDisplayName(project->projectFilePath().toFileInfo().completeBaseName()); + setAddFileFilter("*.py"); } QHash sortFilesIntoPaths(const QString &base, const QSet &files) @@ -616,11 +616,6 @@ bool PythonProjectNode::showInSimpleTree() const return true; } -QString PythonProjectNode::addFileFilter() const -{ - return QLatin1String("*.py"); -} - bool PythonProjectNode::supportsAction(ProjectAction action, const Node *node) const { if (node->isFileNodeType()) { -- cgit v1.2.1