forked from qt-creator/qt-creator
Android: Disable "Make [NDK] default" button while NDKs list is empty
When pressing the "Make [NDK] Default" button while the list is empty leads to a crash. The button should actually not be enabled if the list is empty. This change disables the button while the NDKs list is empty. Fixes: QTCREATORBUG-30716 Change-Id: I5f10fd180f62d20210f1b0c0261e4d821d0582dd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -813,6 +813,7 @@ void AndroidSettingsWidget::updateUI()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_makeDefaultNdkButton->setEnabled(m_ndkListWidget->count() > 0);
|
||||||
m_makeDefaultNdkButton->setText(isDefaultNdkSelected() ? Tr::tr("Unset Default")
|
m_makeDefaultNdkButton->setText(isDefaultNdkSelected() ? Tr::tr("Unset Default")
|
||||||
: Tr::tr("Make Default"));
|
: Tr::tr("Make Default"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user