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,
|
||||
}.attachTo(this);
|
||||
|
||||
connect(m_sdkModel, &AndroidSdkModel::dataChanged, this, [this, buttonBox] {
|
||||
buttonBox->button(QDialogButtonBox::Apply)
|
||||
->setEnabled(m_sdkModel->installationChange().count());
|
||||
});
|
||||
const auto updateApplyButton = [this, buttonBox] {
|
||||
buttonBox->button(QDialogButtonBox::Apply)->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) {
|
||||
if (state == Qt::Checked)
|
||||
|
Reference in New Issue
Block a user