forked from qt-creator/qt-creator
QmakeAndroidSupport: Access parseInProgress and validParse
... via base project node functionality. Change-Id: Ifd9c5b149e11c1d104abed200881fdfe93749144 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -85,21 +85,27 @@ QVariant AndroidExtraLibraryListModel::data(const QModelIndex &index, int role)
|
||||
|
||||
void AndroidExtraLibraryListModel::updateModel()
|
||||
{
|
||||
RunConfiguration *rc = m_target->activeRunConfiguration();
|
||||
QTC_ASSERT(rc, return);
|
||||
|
||||
const ProjectNode *node = m_target->project()->findNodeForBuildKey(rc->buildKey());
|
||||
QTC_ASSERT(node, return);
|
||||
|
||||
AndroidQtSupport *qtSupport = Android::AndroidManager::androidQtSupport(m_target);
|
||||
QTC_ASSERT(qtSupport, return);
|
||||
|
||||
if (qtSupport->parseInProgress(m_target)) {
|
||||
if (node->parseInProgress()) {
|
||||
emit enabledChanged(false);
|
||||
return;
|
||||
}
|
||||
|
||||
bool enabled;
|
||||
beginResetModel();
|
||||
if (qtSupport->validParse(m_target)) {
|
||||
if (node->validParse()) {
|
||||
m_entries = qtSupport->targetData(Constants::AndroidExtraLibs, m_target).toStringList();
|
||||
enabled = true;
|
||||
} else {
|
||||
// parsing error or not a application template
|
||||
// parsing error
|
||||
m_entries.clear();
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user