forked from qt-creator/qt-creator
Android: Update Apply button in AndroidSdkManagerDialog
Disable Apply button on successful installation / uninstallation of packages. Change-Id: I267fa0ff897f3eb25733ba1114a6d683a754821d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -187,10 +187,11 @@ AndroidSdkManagerDialog::AndroidSdkManagerDialog(AndroidSdkManager *sdkManager,
|
|||||||
buttonBox,
|
buttonBox,
|
||||||
}.attachTo(this);
|
}.attachTo(this);
|
||||||
|
|
||||||
connect(m_sdkModel, &AndroidSdkModel::dataChanged, this, [this, buttonBox] {
|
const auto updateApplyButton = [this, buttonBox] {
|
||||||
buttonBox->button(QDialogButtonBox::Apply)
|
buttonBox->button(QDialogButtonBox::Apply)->setEnabled(m_sdkModel->installationChange().count());
|
||||||
->setEnabled(m_sdkModel->installationChange().count());
|
};
|
||||||
});
|
connect(m_sdkModel, &AndroidSdkModel::modelReset, this, updateApplyButton);
|
||||||
|
connect(m_sdkModel, &AndroidSdkModel::dataChanged, this, updateApplyButton);
|
||||||
|
|
||||||
connect(expandCheck, &QCheckBox::stateChanged, this, [packagesView](int state) {
|
connect(expandCheck, &QCheckBox::stateChanged, this, [packagesView](int state) {
|
||||||
if (state == Qt::Checked)
|
if (state == Qt::Checked)
|
||||||
|
Reference in New Issue
Block a user