mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-23 18:51:40 +00:00
QtUtils/RunOnObject: Make safe under object destruction
Co-Authored-By: cancel <cancel@cancel.fm>
This commit is contained in:
parent
f31f1a08fb
commit
268b424843
5 changed files with 61 additions and 13 deletions
|
@ -1196,13 +1196,16 @@ void MainWindow::OnImportNANDBackup()
|
|||
});
|
||||
},
|
||||
[this] {
|
||||
return RunOnObject(this, [this] {
|
||||
std::optional<std::string> keys_file = RunOnObject(this, [this] {
|
||||
return QFileDialog::getOpenFileName(this, tr("Select the keys file (OTP/SEEPROM dump)"),
|
||||
QDir::currentPath(),
|
||||
tr("BootMii keys file (*.bin);;"
|
||||
"All Files (*)"))
|
||||
.toStdString();
|
||||
});
|
||||
if (keys_file)
|
||||
return *keys_file;
|
||||
return std::string("");
|
||||
});
|
||||
QueueOnObject(dialog, &QProgressDialog::close);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue