forked from qt-creator/qt-creator
ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise and slim down user code. Plus some code cosmetics nearby. Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -60,6 +60,7 @@ using namespace ClangCodeModel;
|
||||
using namespace ClangCodeModel::Internal;
|
||||
using namespace Core;
|
||||
using namespace CppTools;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace ClangCodeModel {
|
||||
namespace Utils {
|
||||
@@ -303,12 +304,11 @@ QString diagnosticCategoryPrefixRemoved(const QString &text)
|
||||
|
||||
static ::Utils::FilePath compilerPath(const CppTools::ProjectPart &projectPart)
|
||||
{
|
||||
ProjectExplorer::Target *target = projectPart.project->activeTarget();
|
||||
Target *target = projectPart.project->activeTarget();
|
||||
if (!target)
|
||||
return ::Utils::FilePath();
|
||||
|
||||
ProjectExplorer::ToolChain *toolchain = ProjectExplorer::ToolChainKitAspect::toolChain(
|
||||
target->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||
ToolChain *toolchain = ToolChainKitAspect::cxxToolChain(target->kit());
|
||||
|
||||
return toolchain->compilerCommand();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user