mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: Properly Delete (Some) Widgets
This is not every memory leak, just the ones that were obvious.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user