diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-08-28 12:23:37 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-09-03 13:15:31 +0000 |
commit | c7e3bbcd118f4b7aec7f56f2e8301d91a418703d (patch) | |
tree | edc69ed3e0265048539c175bd040e1f6ce63cd68 /src/plugins/cpptools/cppprojectfilecategorizer.h | |
parent | b4dd2ea2cc29458a4d5e5746da7707f88b81af25 (diff) |
CppTools: Remove dependency of RawProjectPart to ProjectFile
The feature to category files to ProjectFiles was used by the qmake
project manager to specify if the file is "active", and by the Qbs
project manager to avoid unnecessary MIME type checking.
Make these two different use-cases explicit in the API.
Change-Id: Ia5a7da37f100149366fc75060fe04687e15f2bd3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppprojectfilecategorizer.h')
-rw-r--r-- | src/plugins/cpptools/cppprojectfilecategorizer.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppprojectfilecategorizer.h b/src/plugins/cpptools/cppprojectfilecategorizer.h index 48cd2438c63..10b1ca7c7d5 100644 --- a/src/plugins/cpptools/cppprojectfilecategorizer.h +++ b/src/plugins/cpptools/cppprojectfilecategorizer.h @@ -36,12 +36,14 @@ namespace CppTools { class ProjectFileCategorizer { public: - using FileClassifier = RawProjectPart::FileClassifier; + using FileIsActive = RawProjectPart::FileIsActive; + using GetMimeType = RawProjectPart::GetMimeType; public: ProjectFileCategorizer(const QString &projectPartName, const QStringList &filePaths, - const FileClassifier &fileClassifier = FileClassifier()); + const FileIsActive &fileIsActive = {}, + const GetMimeType &getMimeType = {}); bool hasCSources() const { return !m_cSources.isEmpty(); } bool hasCxxSources() const { return !m_cxxSources.isEmpty(); } @@ -59,7 +61,9 @@ public: QString partName(const QString &languageName) const; private: - ProjectFiles classifyFiles(const QStringList &filePaths, const FileClassifier &fileClassifier); + ProjectFiles classifyFiles(const QStringList &filePaths, + const FileIsActive &fileIsActive, + const GetMimeType &getMimeType); void expandSourcesWithAmbiguousHeaders(const ProjectFiles &ambiguousHeaders); private: |