diff options
| author | 2019-04-09 19:50:59 -0400 | |
|---|---|---|
| committer | 2019-04-09 20:05:57 -0400 | |
| commit | b47c0c8a801c3e60467ad2a5890a9de0dc33f280 (patch) | |
| tree | de5b69d31264842972ac3ce415ade09a7963c001 | |
| parent | configure_hotkeys: Mark member variables as const where applicable in Configu... (diff) | |
| download | yuzu-b47c0c8a801c3e60467ad2a5890a9de0dc33f280.tar.gz yuzu-b47c0c8a801c3e60467ad2a5890a9de0dc33f280.tar.xz yuzu-b47c0c8a801c3e60467ad2a5890a9de0dc33f280.zip | |
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.
| -rw-r--r-- | src/yuzu/configuration/configure_hotkeys.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp index 7a09b66b4..31347ce5a 100644 --- a/src/yuzu/configuration/configure_hotkeys.cpp +++ b/src/yuzu/configuration/configure_hotkeys.cpp | |||
| @@ -74,10 +74,10 @@ void ConfigureHotkeys::Configure(QModelIndex index) { | |||
| 74 | auto* const model = ui->hotkey_list->model(); | 74 | auto* const model = ui->hotkey_list->model(); |
| 75 | const auto previous_key = model->data(index); | 75 | const auto previous_key = model->data(index); |
| 76 | 76 | ||
| 77 | auto* const hotkey_dialog = new SequenceDialog; | 77 | SequenceDialog hotkey_dialog; |
| 78 | 78 | ||
| 79 | const int return_code = hotkey_dialog->exec(); | 79 | const int return_code = hotkey_dialog.exec(); |
| 80 | const auto key_sequence = hotkey_dialog->GetSequence(); | 80 | const auto key_sequence = hotkey_dialog.GetSequence(); |
| 81 | if (return_code == QDialog::Rejected || key_sequence.isEmpty()) { | 81 | if (return_code == QDialog::Rejected || key_sequence.isEmpty()) { |
| 82 | return; | 82 | return; |
| 83 | } | 83 | } |