forked from qt-creator/qt-creator
Android: Avoid a direct use of RunControl::runConfiguration()
Change-Id: I69a610befeda78b85a2cb6285ff60a4e75ff12b4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -93,10 +93,8 @@ static QStringList uniquePaths(const QStringList &files)
|
||||
return paths.toList();
|
||||
}
|
||||
|
||||
static QStringList getSoLibSearchPath(const RunConfiguration *rc)
|
||||
static QStringList getSoLibSearchPath(const ProjectNode *node)
|
||||
{
|
||||
Target *target = rc->target();
|
||||
const ProjectNode *node = target->project()->findNodeForBuildKey(rc->buildKey());
|
||||
if (!node)
|
||||
return {};
|
||||
|
||||
@@ -122,12 +120,10 @@ static QStringList getSoLibSearchPath(const RunConfiguration *rc)
|
||||
return res;
|
||||
}
|
||||
|
||||
static QStringList getExtraLibs(const RunConfiguration *rc)
|
||||
static QStringList getExtraLibs(const ProjectNode *node)
|
||||
{
|
||||
const ProjectNode *node = rc->target()->project()->findNodeForBuildKey(rc->buildKey());
|
||||
if (!node)
|
||||
return {};
|
||||
|
||||
return node->data(Android::Constants::AndroidExtraLibs).toStringList();
|
||||
}
|
||||
|
||||
@@ -171,9 +167,9 @@ void AndroidDebugSupport::start()
|
||||
|
||||
if (isCppDebugging()) {
|
||||
qCDebug(androidDebugSupportLog) << "C++ debugging enabled";
|
||||
auto runConfig = runControl()->runConfiguration();
|
||||
QStringList solibSearchPath = getSoLibSearchPath(runConfig);
|
||||
QStringList extraLibs = getExtraLibs(runConfig);
|
||||
const ProjectNode *node = target->project()->findNodeForBuildKey(runControl()->buildKey());
|
||||
QStringList solibSearchPath = getSoLibSearchPath(node);
|
||||
QStringList extraLibs = getExtraLibs(node);
|
||||
solibSearchPath.append(qtSoPaths(qtVersion));
|
||||
solibSearchPath.append(uniquePaths(extraLibs));
|
||||
setSolibSearchPath(solibSearchPath);
|
||||
|
@@ -869,6 +869,11 @@ ISettingsAspect *RunControl::settings(Core::Id id) const
|
||||
return d->runConfiguration ? d->runConfiguration->currentSettings(id) : nullptr;
|
||||
}
|
||||
|
||||
QString RunControl::buildKey() const
|
||||
{
|
||||
return d->runConfiguration ? d->runConfiguration->buildKey() : QString();
|
||||
}
|
||||
|
||||
BuildTargetInfo RunControl::buildTargetInfo() const
|
||||
{
|
||||
return d->runConfiguration->buildTargetInfo();
|
||||
|
Reference in New Issue
Block a user