Merge pull request #6890 from aldelaro5/qt-fix-random-windows
Qt/CheatWarningWidget: properly supply a parent for the widget
This commit is contained in:
commit
9bdf7c4b5a
|
@ -40,7 +40,7 @@ ARCodeWidget::ARCodeWidget(const UICommon::GameFile& game, bool restart_required
|
|||
|
||||
void ARCodeWidget::CreateWidgets()
|
||||
{
|
||||
m_warning = new CheatWarningWidget(m_game_id, m_restart_required);
|
||||
m_warning = new CheatWarningWidget(m_game_id, m_restart_required, this);
|
||||
m_code_list = new QListWidget;
|
||||
m_code_add = new QPushButton(tr("&Add New Code..."));
|
||||
m_code_edit = new QPushButton(tr("&Edit Code..."));
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
#include "Core/Core.h"
|
||||
#include "DolphinQt2/Settings.h"
|
||||
|
||||
CheatWarningWidget::CheatWarningWidget(const std::string& game_id, bool restart_required)
|
||||
: m_game_id(game_id), m_restart_required(restart_required)
|
||||
CheatWarningWidget::CheatWarningWidget(const std::string& game_id, bool restart_required,
|
||||
QWidget* parent)
|
||||
: QWidget(parent), m_game_id(game_id), m_restart_required(restart_required)
|
||||
{
|
||||
CreateWidgets();
|
||||
ConnectWidgets();
|
||||
|
|
|
@ -15,7 +15,7 @@ class CheatWarningWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CheatWarningWidget(const std::string& game_id, bool restart_required);
|
||||
explicit CheatWarningWidget(const std::string& game_id, bool restart_required, QWidget* parent);
|
||||
|
||||
signals:
|
||||
void OpenCheatEnableSettings();
|
||||
|
|
|
@ -43,7 +43,7 @@ GeckoCodeWidget::GeckoCodeWidget(const UICommon::GameFile& game, bool restart_re
|
|||
|
||||
void GeckoCodeWidget::CreateWidgets()
|
||||
{
|
||||
m_warning = new CheatWarningWidget(m_game_id, m_restart_required);
|
||||
m_warning = new CheatWarningWidget(m_game_id, m_restart_required, this);
|
||||
m_code_list = new QListWidget;
|
||||
m_name_label = new QLabel;
|
||||
m_creator_label = new QLabel;
|
||||
|
|
Loading…
Reference in New Issue