diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index b41acdb3aa5..9d0e79949ef 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -28,7 +28,6 @@ #include "autotoolsproject.h" #include "autotoolsbuildconfiguration.h" #include "autotoolsprojectconstants.h" -#include "autotoolsprojectnode.h" #include "autotoolsopenprojectwizard.h" #include "makestep.h" #include "makefileparserthread.h" @@ -40,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -207,7 +207,7 @@ void AutotoolsProject::makefileParsingFinished() m_watchedFiles.append(absConfigureAc); } - auto newRoot = std::make_unique(projectDirectory()); + auto newRoot = std::make_unique(projectDirectory()); for (const QString &f : m_files) { const Utils::FileName path = Utils::FileName::fromString(f); newRoot->addNestedNode(std::make_unique(path, diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro b/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro index a58d556dda6..8082c55c3f4 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.pro @@ -2,7 +2,6 @@ include(../../qtcreatorplugin.pri) HEADERS = autotoolsprojectplugin.h\ autotoolsopenprojectwizard.h\ - autotoolsprojectnode.h\ autotoolsproject.h\ autotoolsbuildsettingswidget.h\ autotoolsbuildconfiguration.h\ @@ -13,9 +12,9 @@ HEADERS = autotoolsprojectplugin.h\ configurestep.h\ makefileparserthread.h\ makefileparser.h + SOURCES = autotoolsprojectplugin.cpp\ autotoolsopenprojectwizard.cpp\ - autotoolsprojectnode.cpp\ autotoolsproject.cpp\ autotoolsbuildsettingswidget.cpp\ autotoolsbuildconfiguration.cpp\ diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs b/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs index 02ab46557ce..f2354d52db4 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs +++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectmanager.qbs @@ -25,8 +25,6 @@ QtcPlugin { "autotoolsproject.cpp", "autotoolsproject.h", "autotoolsprojectconstants.h", - "autotoolsprojectnode.cpp", - "autotoolsprojectnode.h", "autotoolsprojectplugin.cpp", "autotoolsprojectplugin.h", "configurestep.cpp", diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp deleted file mode 100644 index 793d63a7629..00000000000 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Openismus GmbH. -** Author: Peter Penz (ppenz@openismus.com) -** Author: Patricia Santana Cruz (patriciasantanacruz@gmail.com) -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "autotoolsprojectnode.h" -#include "autotoolsproject.h" - -#include - -using namespace AutotoolsProjectManager; -using namespace AutotoolsProjectManager::Internal; -using namespace ProjectExplorer; - -AutotoolsProjectNode::AutotoolsProjectNode(const Utils::FileName &projectDirectory) : - ProjectNode(projectDirectory) -{ } - -bool AutotoolsProjectNode::showInSimpleTree() const -{ - return true; -} diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h deleted file mode 100644 index a60479eb8cb..00000000000 --- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Openismus GmbH. -** Author: Peter Penz (ppenz@openismus.com) -** Author: Patricia Santana Cruz (patriciasantanacruz@gmail.com) -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include - -namespace Core { class IDocument; } - -namespace AutotoolsProjectManager { -namespace Internal { - -class AutotoolsProject; - -/** - * @brief Implementation of the ProjectExplorer::ProjectNode interface. - * - * A project node represents a file or a folder of the project tree. - * No special operations (addFiles(), removeFiles(), renameFile(), ..) - * are offered. - * - * @see AutotoolsProject - */ -class AutotoolsProjectNode : public ProjectExplorer::ProjectNode -{ -public: - AutotoolsProjectNode(const Utils::FileName &projectDirectory); - - bool showInSimpleTree() const override; -}; - -} // namespace Internal -} // namespace AutotoolsProjectManager diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp index ac1f832bc97..feffd990fe9 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp @@ -115,11 +115,6 @@ CMakeInputsNode::CMakeInputsNode(const Utils::FileName &cmakeLists) : setListInProject(false); } -bool CMakeInputsNode::showInSimpleTree() const -{ - return true; -} - CMakeListsNode::CMakeListsNode(const Utils::FileName &cmakeListPath) : ProjectExplorer::ProjectNode(cmakeListPath) { @@ -152,11 +147,6 @@ CMakeProjectNode::CMakeProjectNode(const Utils::FileName &directory) : setListInProject(false); } -bool CMakeProjectNode::showInSimpleTree() const -{ - return true; -} - QString CMakeProjectNode::tooltip() const { return QString(); @@ -181,11 +171,6 @@ QString CMakeTargetNode::generateId(const Utils::FileName &directory, const QStr return directory.toString() + "///::///" + target; } -bool CMakeTargetNode::showInSimpleTree() const -{ - return true; -} - QString CMakeTargetNode::tooltip() const { return m_tooltip; diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h index ba53326ad01..60bae806af6 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h @@ -34,8 +34,6 @@ class CMakeInputsNode : public ProjectExplorer::ProjectNode { public: CMakeInputsNode(const Utils::FileName &cmakeLists); - - bool showInSimpleTree() const final; }; class CMakeListsNode : public ProjectExplorer::ProjectNode @@ -53,7 +51,6 @@ class CMakeProjectNode : public ProjectExplorer::ProjectNode public: CMakeProjectNode(const Utils::FileName &directory); - bool showInSimpleTree() const final; QString tooltip() const final; bool addFiles(const QStringList &filePaths, QStringList *notAdded) override; @@ -68,7 +65,6 @@ public: void setTargetInformation(const QList &artifacts, const QString &type); - bool showInSimpleTree() const final; QString tooltip() const final; QString buildKey() const final; diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp index ebc53187f9a..f58e5bff010 100644 --- a/src/plugins/genericprojectmanager/genericproject.cpp +++ b/src/plugins/genericprojectmanager/genericproject.cpp @@ -129,8 +129,6 @@ public: setDisplayName(project->projectFilePath().toFileInfo().completeBaseName()); } - bool showInSimpleTree() const override { return true; } - bool supportsAction(ProjectAction action, const Node *) const override { return action == AddNewFile diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index 2357dc14098..c2596497a2b 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -337,6 +337,7 @@ public: bool isFolderNodeType() const override { return false; } bool isProjectNodeType() const override { return true; } + bool showInSimpleTree() const override { return true; } bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override; bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override; diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 4acb367622b..9de4989a936 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -115,7 +115,6 @@ class PythonProjectNode : public ProjectNode public: PythonProjectNode(PythonProject *project); - bool showInSimpleTree() 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; @@ -611,11 +610,6 @@ QHash sortFilesIntoPaths(const QString &base, const QSetasFileNode()) { diff --git a/src/plugins/qbsprojectmanager/qbsnodes.cpp b/src/plugins/qbsprojectmanager/qbsnodes.cpp index c5830b176a6..9ceb32c0337 100644 --- a/src/plugins/qbsprojectmanager/qbsnodes.cpp +++ b/src/plugins/qbsprojectmanager/qbsnodes.cpp @@ -330,11 +330,6 @@ QbsProductNode::QbsProductNode(const qbs::ProductData &prd) : setIcon(productIcon); } -bool QbsProductNode::showInSimpleTree() const -{ - return true; -} - bool QbsProductNode::supportsAction(ProjectAction action, const Node *node) const { if (action == AddNewFile || action == AddExistingFile) @@ -425,11 +420,6 @@ const qbs::Project QbsProjectNode::qbsProject() const return project()->qbsProject(); } -bool QbsProjectNode::showInSimpleTree() const -{ - return true; -} - void QbsProjectNode::setProjectData(const qbs::ProjectData &data) { m_projectData = data; diff --git a/src/plugins/qbsprojectmanager/qbsnodes.h b/src/plugins/qbsprojectmanager/qbsnodes.h index ab0ebb96583..db1a7b0ef1c 100644 --- a/src/plugins/qbsprojectmanager/qbsnodes.h +++ b/src/plugins/qbsprojectmanager/qbsnodes.h @@ -44,6 +44,7 @@ class QbsGroupNode : public ProjectExplorer::ProjectNode public: QbsGroupNode(const qbs::GroupData &grp, const QString &productPath); + bool showInSimpleTree() const final { return false; } bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const final; bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override; bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override; @@ -65,7 +66,6 @@ class QbsProductNode : public ProjectExplorer::ProjectNode public: explicit QbsProductNode(const qbs::ProductData &prd); - bool showInSimpleTree() const override; bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const final; bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override; bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override; @@ -93,7 +93,6 @@ public: const qbs::Project qbsProject() const; const qbs::ProjectData qbsProjectData() const { return m_projectData; } - bool showInSimpleTree() const override; void setProjectData(const qbs::ProjectData &data); // FIXME: Needed? private: diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp index 32d4f5292ae..7b311c2cf63 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp @@ -53,11 +53,6 @@ QmlProjectNode::QmlProjectNode(QmlProject *project) : ProjectNode(project->proje setIcon(qmlProjectIcon); } -bool QmlProjectNode::showInSimpleTree() const -{ - return true; -} - bool QmlProjectNode::supportsAction(ProjectAction action, const Node *node) const { if (action == AddNewFile || action == EraseFile) diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.h b/src/plugins/qmlprojectmanager/qmlprojectnodes.h index 6a3f688b3d3..4d6fe4cfcf1 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.h +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.h @@ -38,7 +38,6 @@ class QmlProjectNode : public ProjectExplorer::ProjectNode public: QmlProjectNode(QmlProject *project); - bool showInSimpleTree() const override; bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override; bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override; bool deleteFiles(const QStringList &filePaths) override;