From c763d4d78711d4fdf01ce8aa713383a0a131a39e Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 13 Sep 2018 12:58:38 +0200 Subject: [PATCH] ProjectExplorer: Remove HeaderPath::isFrameworkPath None of the other types has a query function, so remove this one, too. Change-Id: I936d162e092c8f9361b0e3bb86676e68905d2f4b Reviewed-by: Marco Bubke --- .../clangcodemodel/clangcompletionassistprocessor.cpp | 2 +- src/plugins/cpptools/cppcompletionassist.cpp | 2 +- src/plugins/cpptools/cppsourceprocessor.cpp | 4 ++-- src/plugins/projectexplorer/headerpath.h | 5 ----- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp index ad031ca5f79..1d9d8363e63 100644 --- a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp +++ b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp @@ -479,7 +479,7 @@ bool ClangCompletionAssistProcessor::completeInclude(const QTextCursor &cursor) if (!directoryPrefix.isEmpty()) { realPath += QLatin1Char('/'); realPath += directoryPrefix; - if (headerPath.isFrameworkPath()) + if (headerPath.type == ProjectExplorer::HeaderPathType::Framework) realPath += QLatin1String(".framework/Headers"); } completeIncludePath(realPath, suffixes); diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index e709dbf573a..00acaa9abe4 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -1271,7 +1271,7 @@ bool InternalCppCompletionAssistProcessor::completeInclude(const QTextCursor &cu if (!directoryPrefix.isEmpty()) { realPath += QLatin1Char('/'); realPath += directoryPrefix; - if (headerPath.isFrameworkPath()) + if (headerPath.type == ProjectExplorer::HeaderPathType::Framework) realPath += QLatin1String(".framework/Headers"); } completeInclude(realPath, suffixes); diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp index 0f9b94a30ff..54e93ce41a4 100644 --- a/src/plugins/cpptools/cppsourceprocessor.cpp +++ b/src/plugins/cpptools/cppsourceprocessor.cpp @@ -159,7 +159,7 @@ void CppSourceProcessor::setLanguageFeatures(const LanguageFeatures languageFeat // if the "Frameworks" folder exists inside the top level framework. void CppSourceProcessor::addFrameworkPath(const ProjectExplorer::HeaderPath &frameworkPath) { - QTC_ASSERT(frameworkPath.isFrameworkPath(), return); + QTC_ASSERT(frameworkPath.type == ProjectExplorer::HeaderPathType::Framework, return); // The algorithm below is a bit too eager, but that's because we're not getting // in the frameworks we're linking against. If we would have that, then we could @@ -303,7 +303,7 @@ QString CppSourceProcessor::resolveFile_helper(const QString &fileName, for (; headerPathsIt != headerPathsEnd; ++headerPathsIt) { if (!headerPathsIt->path.isNull()) { QString path; - if (headerPathsIt->isFrameworkPath()) { + if (headerPathsIt->type == ProjectExplorer::HeaderPathType::Framework) { if (index == -1) continue; path = headerPathsIt->path + fileName.left(index) diff --git a/src/plugins/projectexplorer/headerpath.h b/src/plugins/projectexplorer/headerpath.h index 932c256f33d..39d668aeb83 100644 --- a/src/plugins/projectexplorer/headerpath.h +++ b/src/plugins/projectexplorer/headerpath.h @@ -44,11 +44,6 @@ public: : path(path), type(type) { } - bool isFrameworkPath() const - { - return type == HeaderPathType::Framework; - } - bool operator==(const HeaderPath &other) const { return type == other.type && path == other.path;