forked from qt-creator/qt-creator
improve code
Change-Id: I06c7274c39f7e369d4cd9bed0c1ef77e4bc08b35 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -315,15 +315,11 @@ static ::Utils::FilePath compilerPath(const CppTools::ProjectPart &projectPart)
|
||||
|
||||
static ::Utils::FilePath buildDirectory(const ProjectExplorer::Project &project)
|
||||
{
|
||||
ProjectExplorer::Target *target = project.activeTarget();
|
||||
if (!target)
|
||||
return ::Utils::FilePath();
|
||||
|
||||
ProjectExplorer::BuildConfiguration *buildConfig = target->activeBuildConfiguration();
|
||||
if (!buildConfig)
|
||||
return ::Utils::FilePath();
|
||||
|
||||
return buildConfig->buildDirectory();
|
||||
if (auto *target = project.activeTarget()) {
|
||||
if (auto *bc = target->activeBuildConfiguration())
|
||||
return bc->buildDirectory();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
static QStringList projectPartArguments(const ProjectPart &projectPart)
|
||||
|
||||
Reference in New Issue
Block a user