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();
|
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)
|
if (!node)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
@@ -122,12 +120,10 @@ static QStringList getSoLibSearchPath(const RunConfiguration *rc)
|
|||||||
return res;
|
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)
|
if (!node)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
return node->data(Android::Constants::AndroidExtraLibs).toStringList();
|
return node->data(Android::Constants::AndroidExtraLibs).toStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,9 +167,9 @@ void AndroidDebugSupport::start()
|
|||||||
|
|
||||||
if (isCppDebugging()) {
|
if (isCppDebugging()) {
|
||||||
qCDebug(androidDebugSupportLog) << "C++ debugging enabled";
|
qCDebug(androidDebugSupportLog) << "C++ debugging enabled";
|
||||||
auto runConfig = runControl()->runConfiguration();
|
const ProjectNode *node = target->project()->findNodeForBuildKey(runControl()->buildKey());
|
||||||
QStringList solibSearchPath = getSoLibSearchPath(runConfig);
|
QStringList solibSearchPath = getSoLibSearchPath(node);
|
||||||
QStringList extraLibs = getExtraLibs(runConfig);
|
QStringList extraLibs = getExtraLibs(node);
|
||||||
solibSearchPath.append(qtSoPaths(qtVersion));
|
solibSearchPath.append(qtSoPaths(qtVersion));
|
||||||
solibSearchPath.append(uniquePaths(extraLibs));
|
solibSearchPath.append(uniquePaths(extraLibs));
|
||||||
setSolibSearchPath(solibSearchPath);
|
setSolibSearchPath(solibSearchPath);
|
||||||
|
@@ -869,6 +869,11 @@ ISettingsAspect *RunControl::settings(Core::Id id) const
|
|||||||
return d->runConfiguration ? d->runConfiguration->currentSettings(id) : nullptr;
|
return d->runConfiguration ? d->runConfiguration->currentSettings(id) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString RunControl::buildKey() const
|
||||||
|
{
|
||||||
|
return d->runConfiguration ? d->runConfiguration->buildKey() : QString();
|
||||||
|
}
|
||||||
|
|
||||||
BuildTargetInfo RunControl::buildTargetInfo() const
|
BuildTargetInfo RunControl::buildTargetInfo() const
|
||||||
{
|
{
|
||||||
return d->runConfiguration->buildTargetInfo();
|
return d->runConfiguration->buildTargetInfo();
|
||||||
|
Reference in New Issue
Block a user