From cc7fe5eac6ea6125b063ee36d0763d5cb230e26f Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Mon, 1 Jul 2013 16:13:48 +0200 Subject: Project: Simplfy file adding/removing interface The filetype is only relevant for Qt4 projects. But even for Qt4 projects the file type is insufficient to decide where the file should be added. So remove the file type from the interface and let the projectmanagers themselves figure out what they want to do. Also fix Task-number: QTCREATORBUG-9688 Change-Id: I02f7b1cd2e05efaf76e36fb9af34b109d4482f88 Reviewed-by: Tobias Hunger --- src/plugins/qmlprojectmanager/qmlprojectnodes.cpp | 12 ++++-------- src/plugins/qmlprojectmanager/qmlprojectnodes.h | 18 ++++-------------- 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'src/plugins/qmlprojectmanager') diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp index 70cd26e826..01c43d173e 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.cpp @@ -198,26 +198,22 @@ bool QmlProjectNode::removeSubProjects(const QStringList &proFilePaths) return false; } -bool QmlProjectNode::addFiles(const ProjectExplorer::FileType /*fileType*/, - const QStringList &filePaths, QStringList * /*notAdded*/) +bool QmlProjectNode::addFiles(const QStringList &filePaths, QStringList * /*notAdded*/) { return m_project->addFiles(filePaths); } -bool QmlProjectNode::removeFiles(const ProjectExplorer::FileType /*fileType*/, - const QStringList & /*filePaths*/, QStringList * /*notRemoved*/) +bool QmlProjectNode::removeFiles(const QStringList & /*filePaths*/, QStringList * /*notRemoved*/) { return false; } -bool QmlProjectNode::deleteFiles(const ProjectExplorer::FileType /*fileType*/, - const QStringList & /*filePaths*/) +bool QmlProjectNode::deleteFiles(const QStringList & /*filePaths*/) { return true; } -bool QmlProjectNode::renameFile(const ProjectExplorer::FileType /*fileType*/, - const QString & /*filePath*/, const QString & /*newFilePath*/) +bool QmlProjectNode::renameFile(const QString & /*filePath*/, const QString & /*newFilePath*/) { return true; } diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.h b/src/plugins/qmlprojectmanager/qmlprojectnodes.h index 6796467c5f..d75d4ece21 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectnodes.h +++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.h @@ -63,20 +63,10 @@ public: virtual bool addSubProjects(const QStringList &proFilePaths); virtual bool removeSubProjects(const QStringList &proFilePaths); - virtual bool addFiles(const ProjectExplorer::FileType fileType, - const QStringList &filePaths, - QStringList *notAdded = 0); - - virtual bool removeFiles(const ProjectExplorer::FileType fileType, - const QStringList &filePaths, - QStringList *notRemoved = 0); - - virtual bool deleteFiles(const ProjectExplorer::FileType fileType, - const QStringList &filePaths); - - virtual bool renameFile(const ProjectExplorer::FileType fileType, - const QString &filePath, - const QString &newFilePath); + virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0); + virtual bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0); + virtual bool deleteFiles(const QStringList &filePaths); + virtual bool renameFile(const QString &filePath, const QString &newFilePath); virtual QList runConfigurationsFor(Node *node); -- cgit v1.2.1