Permalink
Browse files

Qt: Unparent NetPlay dialog from main window

This should make the NetPlay dialog appear as a separate window in the taskbar on most systems, which makes more sense than a parented dialog as the user will leave it open for an extended period.
  • Loading branch information...
Techjar committed Jul 4, 2018
1 parent fd83937 commit f620128dac607d99e6ac75168b87db413f89cd45
@@ -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); });
@@ -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);
@@ -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);

0 comments on commit f620128

Please sign in to comment.