[Qt] Delete "ui" pointer in destructor

This commit is contained in:
scribam 2017-09-03 19:01:54 +02:00 committed by Ani
parent cd4b28b4d7
commit f39e2b999f
7 changed files with 19 additions and 0 deletions

View File

@ -25,3 +25,8 @@ about_dialog::about_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::about_
layout()->setSizeConstraint(QLayout::SetFixedSize);
}
about_dialog::~about_dialog()
{
delete ui;
}

View File

@ -13,6 +13,7 @@ class about_dialog : public QDialog
public:
explicit about_dialog(QWidget* parent = nullptr);
~about_dialog();
private:
Ui::about_dialog *ui;

View File

@ -53,6 +53,7 @@ main_window::main_window(std::shared_ptr<gui_settings> guiSettings, QWidget *par
main_window::~main_window()
{
delete ui;
}
auto Pause = []()

View File

@ -878,6 +878,11 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const
layout()->setSizeConstraint(QLayout::SetFixedSize);
}
settings_dialog::~settings_dialog()
{
delete ui;
}
void settings_dialog::AddConfigs()
{
ui->combo_configs->clear();

View File

@ -21,6 +21,7 @@ class settings_dialog : public QDialog
public:
explicit settings_dialog(std::shared_ptr<gui_settings> xSettings, const Render_Creator& r_Creator, const int& tabIndex = 0, QWidget *parent = 0, const GameInfo *game = nullptr);
~settings_dialog();
int exec();
Q_SIGNALS:
void GuiSettingsSyncRequest();

View File

@ -35,3 +35,8 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::we
layout()->setSizeConstraint(QLayout::SetFixedSize);
}
welcome_dialog::~welcome_dialog()
{
delete ui;
}

View File

@ -15,6 +15,7 @@ class welcome_dialog : public QDialog
public:
explicit welcome_dialog(QWidget* parent = nullptr);
~welcome_dialog();
private:
Ui::welcome_dialog *ui;