Merge pull request #7212 from Techjar/netplay-unparent-dialog

Qt: Unparent NetPlay dialog from main window
This commit is contained in:
spycrab 2018-07-05 22:49:58 +02:00 committed by GitHub
commit 14317c8a0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -156,6 +156,7 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters) : QMainW
MainWindow::~MainWindow()
{
m_render_widget->deleteLater();
m_netplay_dialog->deleteLater();
ShutdownControllers();
QSettings& settings = Settings::GetQSettings();
@ -1037,7 +1038,7 @@ void MainWindow::BootWiiSystemMenu()
void MainWindow::NetPlayInit()
{
m_netplay_setup_dialog = new NetPlaySetupDialog(this);
m_netplay_dialog = new NetPlayDialog(this);
m_netplay_dialog = new NetPlayDialog;
connect(m_netplay_dialog, &NetPlayDialog::Boot, this,
[this](const QString& path) { StartGame(path); });

View File

@ -42,6 +42,7 @@
#include "DolphinQt2/NetPlay/PadMappingDialog.h"
#include "DolphinQt2/QtUtils/QueueOnObject.h"
#include "DolphinQt2/QtUtils/RunOnObject.h"
#include "DolphinQt2/Resources.h"
#include "DolphinQt2/Settings.h"
#include "VideoCommon/VideoConfig.h"
@ -52,6 +53,7 @@ NetPlayDialog::NetPlayDialog(QWidget* parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("NetPlay"));
setWindowIcon(Resources::GetAppIcon());
m_pad_mapping = new PadMappingDialog(this);
m_md5_dialog = new MD5Dialog(this);

View File

@ -30,7 +30,7 @@ class NetPlayDialog : public QDialog, public NetPlayUI
{
Q_OBJECT
public:
explicit NetPlayDialog(QWidget* parent);
explicit NetPlayDialog(QWidget* parent = nullptr);
~NetPlayDialog();
void show(std::string nickname, bool use_traversal);