QMakeAndroid: Replace QmakeAndroidSupport::projectFilePath

... by existing base functionality.

Change-Id: I38bc25cba5f50b7694df73f57bec67a250ac9bdf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2018-12-04 15:49:47 +01:00
parent e9d3a9b1e8
commit 758db05c73
4 changed files with 10 additions and 10 deletions

View File

@@ -30,9 +30,12 @@
#include <android/androidmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
namespace Android {
AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(ProjectExplorer::Target *target,
@@ -109,11 +112,16 @@ void AndroidExtraLibraryListModel::addEntries(const QStringList &list)
{
AndroidQtSupport *qtSupport = Android::AndroidManager::androidQtSupport(m_target);
QTC_ASSERT(qtSupport, return);
Utils::FileName projectFilePath = qtSupport->projectFilePath(m_target);
RunConfiguration *rc = m_target->activeRunConfiguration();
QTC_ASSERT(rc, return);
const ProjectNode *node = m_target->project()->findNodeForBuildKey(rc->buildKey());
QTC_ASSERT(node, return);
beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size());
const QDir dir = qtSupport->projectFilePath(m_target).toFileInfo().absoluteDir();
const QDir dir = node->filePath().toFileInfo().absoluteDir();
for (const QString &path : list)
m_entries += "$$PWD/" + dir.relativeFilePath(path);