mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 20:14:17 +01:00
configure_hotkeys: Avoid dialog memory leak within Configure()
Without a parent, this dialog won't have its memory freed when it happens to get destroyed.
This commit is contained in:
parent
d7d1be509b
commit
562e0114eb
@ -78,10 +78,10 @@ void ConfigureHotkeys::Configure(QModelIndex index) {
|
|||||||
auto* const model = ui->hotkey_list->model();
|
auto* const model = ui->hotkey_list->model();
|
||||||
const auto previous_key = model->data(index);
|
const auto previous_key = model->data(index);
|
||||||
|
|
||||||
auto* const hotkey_dialog = new SequenceDialog;
|
SequenceDialog hotkey_dialog;
|
||||||
|
|
||||||
const int return_code = hotkey_dialog->exec();
|
const int return_code = hotkey_dialog.exec();
|
||||||
const auto key_sequence = hotkey_dialog->GetSequence();
|
const auto key_sequence = hotkey_dialog.GetSequence();
|
||||||
if (return_code == QDialog::Rejected || key_sequence.isEmpty()) {
|
if (return_code == QDialog::Rejected || key_sequence.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user