2
0
forked from Ivasoft/DSView

fix: Have used a MsgBox pointer from stack

This commit is contained in:
dreamsourcelabTAI
2023-06-14 18:19:12 +08:00
parent 3c49de125c
commit 8beebd4d98
3 changed files with 21 additions and 16 deletions

View File

@@ -411,11 +411,15 @@ namespace pv
break;
}
dialogs::DSMessageBox *box = NULL;
MsgBox::Show("", title, details, this, &box, true);
// auto evo = _session->device_event_object();
//connect(evo, SIGNAL(device_updated()), box, SLOT(accept()));
// box->exec();
pv::dialogs::DSMessageBox msg(this, title);
msg.mBox()->setText(details);
msg.mBox()->setStandardButtons(QMessageBox::Ok);
msg.mBox()->setIcon(QMessageBox::Warning);
connect(_session->device_event_object(), SIGNAL(device_updated()), &msg, SLOT(accept()));
_msg = &msg;
msg.exec();
_msg = NULL;
_session->clear_error();
}