summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-05-02 17:30:49 +0200
committerGitHub <noreply@github.com>2024-05-02 17:30:49 +0200
commit5817be7bd3ac1b3f68a24410dc416d69ae2ff20f (patch)
tree4f9586afbdd910689cb883422fbbdf3289989ca2 /Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp
parent967280f140f39283e9e6997ffa6426329d94f611 (diff)
parent0397339ab1fbdf6309ab14dbf48946853c608522 (diff)
Merge pull request #12747 from mitaclaw/qt-memory-leaks
DolphinQt: Properly Delete (Some) Widgets
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp')
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayBrowser.cpp18
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);