diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-04-30 10:58:16 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-04-30 11:17:28 -0700 |
| commit | 0397339ab1fbdf6309ab14dbf48946853c608522 (patch) | |
| tree | 0f116933da42d99f743817f75110b037082619b4 /Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp | |
| parent | e69486d2cb4e3e01dd622d760350b26d6cbd59f5 (diff) | |
DolphinQt: Properly Delete (Some) Widgets
This is not every memory leak, just the ones that were obvious.
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp index 141a8bf2d6..d502e8943e 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp @@ -295,19 +295,19 @@ void NetPlayBrowser::accept() if (m_sessions[index].has_password) { - auto* dialog = new QInputDialog(this); + QInputDialog dialog(this); - dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint); - dialog->setWindowTitle(tr("Enter password")); - dialog->setLabelText(tr("This session requires a password:")); - dialog->setWindowModality(Qt::WindowModal); - dialog->setTextEchoMode(QLineEdit::Password); + dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint); + dialog.setWindowTitle(tr("Enter password")); + dialog.setLabelText(tr("This session requires a password:")); + dialog.setWindowModality(Qt::WindowModal); + dialog.setTextEchoMode(QLineEdit::Password); - SetQWidgetWindowDecorations(dialog); - if (dialog->exec() != QDialog::Accepted) + SetQWidgetWindowDecorations(&dialog); + if (dialog.exec() != QDialog::Accepted) return; - const std::string password = dialog->textValue().toStdString(); + const std::string password = dialog.textValue().toStdString(); auto decrypted_id = session.DecryptID(password); |
