diff options
author | Daniel Teske <daniel.teske@digia.com> | 2013-07-01 16:13:48 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2013-07-08 17:05:04 +0200 |
commit | cc7fe5eac6ea6125b063ee36d0763d5cb230e26f (patch) | |
tree | 59a9750b5ce40148764526171fb807bab0aaaa68 /src/plugins/qmlprojectmanager | |
parent | a98fe15fe51a87e2943623caf2a8ea072cfc5919 (diff) | |
download | qt-creator-cc7fe5eac6ea6125b063ee36d0763d5cb230e26f.tar.gz |
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 <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/qmlprojectmanager')
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlprojectnodes.cpp | 12 | ||||
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlprojectnodes.h | 18 |
2 files changed, 8 insertions, 22 deletions
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<ProjectExplorer::RunConfiguration *> runConfigurationsFor(Node *node); |