From abc4d5f9e29c21d2a5fd56d1a641e4b5c11b99e9 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 13 Aug 2013 10:35:03 +0200 Subject: [PATCH] Autotools: Add method to retrieve default build dir based on project file Change-Id: Ifd5af5c69329d2b9c86da8c8df796f317c65e1ee Reviewed-by: Tobias Hunger --- src/plugins/autotoolsprojectmanager/autotoolsproject.cpp | 7 ++++++- src/plugins/autotoolsprojectmanager/autotoolsproject.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index 4cffc351277..e0771d9468b 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -125,7 +125,12 @@ IProjectManager *AutotoolsProject::projectManager() const QString AutotoolsProject::defaultBuildDirectory() const { - return projectDirectory(); + return defaultBuildDirectory(projectFilePath()); +} + +QString AutotoolsProject::defaultBuildDirectory(const QString &projectPath) +{ + return QFileInfo(projectPath).absolutePath(); } ProjectNode *AutotoolsProject::rootProjectNode() const diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.h b/src/plugins/autotoolsprojectmanager/autotoolsproject.h index 9da7c6a1dd9..a39de5522bc 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.h @@ -77,6 +77,7 @@ public: ProjectExplorer::ProjectNode *rootProjectNode() const; QStringList files(FilesMode fileMode) const; QString defaultBuildDirectory() const; + static QString defaultBuildDirectory(const QString &projectPath); QStringList buildTargets() const; protected: