diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-01-09 18:31:20 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-01-15 10:37:03 +0000 |
commit | 5dbaf387ba231377c3c6c201b21f9f9cb1881526 (patch) | |
tree | 813f36f73dee79009ea2ce7991cfcfa54e9e78f5 /src/plugins/cpptools/compileroptionsbuilder.cpp | |
parent | e5558cd0c52b3cdf70d14911ad4b8dbbf08979c5 (diff) | |
download | qt-creator-5dbaf387ba231377c3c6c201b21f9f9cb1881526.tar.gz |
Utils: Move C++ language details from ProjectExplorer to Utils
We want to use them in the backend processes too so it's nice to share them
in Utils. A concrete size was added too because they should be serialized.
Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r-- | src/plugins/cpptools/compileroptionsbuilder.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index fae2e29fb5..0809a323d2 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -31,11 +31,11 @@ #include <coreplugin/icore.h> #include <projectexplorer/headerpath.h> -#include <projectexplorer/language.h> #include <projectexplorer/project.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectmacro.h> +#include <utils/cpplanguage_details.h> #include <utils/fileutils.h> #include <utils/qtcassert.h> @@ -95,12 +95,12 @@ QStringList CompilerOptionsBuilder::build(ProjectFile::Kind fileKind, m_options.clear(); if (fileKind == ProjectFile::CHeader || fileKind == ProjectFile::CSource) { - QTC_ASSERT(m_projectPart.languageVersion <= ProjectExplorer::LanguageVersion::LatestC, + QTC_ASSERT(m_projectPart.languageVersion <= Utils::LanguageVersion::LatestC, return QStringList();); } if (fileKind == ProjectFile::CXXHeader || fileKind == ProjectFile::CXXSource) { - QTC_ASSERT(m_projectPart.languageVersion > ProjectExplorer::LanguageVersion::LatestC, + QTC_ASSERT(m_projectPart.languageVersion > Utils::LanguageVersion::LatestC, return QStringList();); } @@ -319,7 +319,7 @@ void CompilerOptionsBuilder::addMacros(const ProjectExplorer::Macros ¯os) void CompilerOptionsBuilder::updateFileLanguage(ProjectFile::Kind fileKind) { const bool objcExt = m_projectPart.languageExtensions - & ProjectExplorer::LanguageExtension::ObjectiveC; + & Utils::LanguageExtension::ObjectiveC; const QStringList options = createLanguageOptionGcc(fileKind, objcExt); if (options.isEmpty()) return; @@ -334,11 +334,11 @@ void CompilerOptionsBuilder::updateFileLanguage(ProjectFile::Kind fileKind) void CompilerOptionsBuilder::addLanguageVersionAndExtensions() { - using ProjectExplorer::LanguageExtension; - using ProjectExplorer::LanguageVersion; + using Utils::LanguageExtension; + using Utils::LanguageVersion; QStringList options; - const ProjectExplorer::LanguageExtensions languageExtensions = m_projectPart.languageExtensions; + const Utils::LanguageExtensions languageExtensions = m_projectPart.languageExtensions; const bool gnuExtensions = languageExtensions & LanguageExtension::Gnu; switch (m_projectPart.languageVersion) { |