diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-02-01 09:48:58 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2017-02-02 14:46:13 +0000 |
commit | e2e78c6a5d1e12f08204f07ca095f5d49ac59360 (patch) | |
tree | 9c713079d0a9d095edbacd7d4e7ad8f84acee817 /src/plugins/cpptools/cppprojectfile.cpp | |
parent | 6bf8f85b33ac3a3228f907f227d47e0fc54b614f (diff) | |
download | qt-creator-e2e78c6a5d1e12f08204f07ca095f5d49ac59360.tar.gz |
CppTools: Distinguish between ProjectFile::{unclassified,unsupported}
There was no way to determine whether ProjectFile::classify() was run or
not. Now, ProjectFile::classify() returns ProjectFile::Unsupported
instead of ProjectFile::Unclassified.
Change-Id: I660d0e42044bdefcac38058c6f4a3425983a6d93
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppprojectfile.cpp')
-rw-r--r-- | src/plugins/cpptools/cppprojectfile.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppprojectfile.cpp b/src/plugins/cpptools/cppprojectfile.cpp index 5b36422197..4fa801606c 100644 --- a/src/plugins/cpptools/cppprojectfile.cpp +++ b/src/plugins/cpptools/cppprojectfile.cpp @@ -53,7 +53,7 @@ ProjectFile::Kind ProjectFile::classify(const QString &filePath) Utils::MimeDatabase mdb; const Utils::MimeType mimeType = mdb.mimeTypeForFile(filePath); if (!mimeType.isValid()) - return Unclassified; + return Unsupported; const QString mt = mimeType.name(); if (mt == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)) return CSource; @@ -71,7 +71,7 @@ ProjectFile::Kind ProjectFile::classify(const QString &filePath) return CXXSource; if (mt == QLatin1String(CppTools::Constants::MOC_MIMETYPE)) return CXXSource; - return Unclassified; + return Unsupported; } bool ProjectFile::isAmbiguousHeader(const QString &filePath) @@ -86,7 +86,7 @@ bool ProjectFile::isHeader(ProjectFile::Kind kind) case ProjectFile::CXXHeader: case ProjectFile::ObjCHeader: case ProjectFile::ObjCXXHeader: - case ProjectFile::Unclassified: // no file extension, e.g. stl headers + case ProjectFile::Unsupported: // no file extension, e.g. stl headers case ProjectFile::AmbiguousHeader: return true; default: @@ -124,6 +124,7 @@ const char *projectFileKindToText(ProjectFile::Kind kind) { switch (kind) { RETURN_TEXT_FOR_CASE(Unclassified); + RETURN_TEXT_FOR_CASE(Unsupported); RETURN_TEXT_FOR_CASE(AmbiguousHeader); RETURN_TEXT_FOR_CASE(CHeader); RETURN_TEXT_FOR_CASE(CSource); |