diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2017-03-10 17:03:51 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2017-03-10 16:44:30 +0000 |
commit | a70370cc047b96067de32af9ceab9fbc51c90bd9 (patch) | |
tree | 6d66a839b314719aa03723f2c39b16e39b10da20 /src/plugins/projectexplorer/projectnodes.h | |
parent | 7648504a30a0042da94f603ff66ad3b0f1d2c51c (diff) |
ProjectNodes: Add method to query FileType
Add methods to get the FileType based on filepath or mimetype.
Use that method in treescanner.
Change-Id: I3de50d7afd8262cc86ae722e7de4ca53921153d2
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projectnodes.h')
-rw-r--r-- | src/plugins/projectexplorer/projectnodes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index 176b126f64..3785d2265d 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -36,6 +36,8 @@ #include <functional> +namespace Utils { class MimeType; } + namespace ProjectExplorer { class RunConfiguration; class Project; @@ -141,6 +143,9 @@ public: static bool sortByPath(const Node *a, const Node *b); void setParentFolderNode(FolderNode *parentFolder); + static FileType fileTypeForMimeType(const Utils::MimeType &mt); + static FileType fileTypeForFileName(const Utils::FileName &file); + protected: Node(NodeType nodeType, const Utils::FileName &filePath, int line = -1); |