Ensure BankSetupWizard triggers only when bankProfileId is empty and pinCodeChecked is false in DeviceSettingsWindow and DeviceWidget.
This commit is contained in:
parent
a046a27569
commit
c5e8fc4ed5
@ -147,7 +147,7 @@ void DeviceSettingsWindow::reloadContent(QTableWidget *tableWidget) {
|
|||||||
|
|
||||||
connect(settingsBtn, &QPushButton::clicked, this, [this, app, tableWidget]() {
|
connect(settingsBtn, &QPushButton::clicked, this, [this, app, tableWidget]() {
|
||||||
const BankProfileInfo dbApp = BankProfileDAO::getApplication(m_deviceId, app.code);
|
const BankProfileInfo dbApp = BankProfileDAO::getApplication(m_deviceId, app.code);
|
||||||
if (dbApp.id < 0 || !dbApp.pinCodeChecked) {
|
if (dbApp.id < 0 || (!dbApp.pinCodeChecked && dbApp.bankProfileId.isEmpty())) {
|
||||||
auto *wizard = new BankSetupWizard(this, m_deviceId, dbApp.id >= 0 ? dbApp : app);
|
auto *wizard = new BankSetupWizard(this, m_deviceId, dbApp.id >= 0 ? dbApp : app);
|
||||||
wizard->setAttribute(Qt::WA_DeleteOnClose);
|
wizard->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
connect(wizard, &QDialog::finished, this, [this, tableWidget]() {
|
connect(wizard, &QDialog::finished, this, [this, tableWidget]() {
|
||||||
|
|||||||
@ -239,7 +239,7 @@ void DeviceWidget::setOpenBanksSettings(QPushButton *button, const BankProfileIn
|
|||||||
QString deviceName = m_device.name;
|
QString deviceName = m_device.name;
|
||||||
connect(button, &QPushButton::clicked, this, [deviceId, deviceName, app]() {
|
connect(button, &QPushButton::clicked, this, [deviceId, deviceName, app]() {
|
||||||
const BankProfileInfo dbApp = BankProfileDAO::getApplication(deviceId, app.code);
|
const BankProfileInfo dbApp = BankProfileDAO::getApplication(deviceId, app.code);
|
||||||
if (dbApp.id < 0 || !dbApp.pinCodeChecked) {
|
if (dbApp.id < 0 || (!dbApp.pinCodeChecked && dbApp.bankProfileId.isEmpty())) {
|
||||||
auto *wizard = new BankSetupWizard(nullptr, deviceId, dbApp.id >= 0 ? dbApp : app);
|
auto *wizard = new BankSetupWizard(nullptr, deviceId, dbApp.id >= 0 ? dbApp : app);
|
||||||
wizard->setAttribute(Qt::WA_DeleteOnClose);
|
wizard->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
wizard->show();
|
wizard->show();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user