Move MainWindow::getContext() to constructor

ctx always exists, spares a few if else statements
This commit is contained in:
tobtoht
2020-10-11 19:16:33 +02:00
parent 892416bc51
commit 2bddad004d
7 changed files with 12 additions and 16 deletions
+2 -3
View File
@@ -12,10 +12,9 @@ Settings::Settings(QWidget *parent) :
ui(new Ui::Settings)
{
ui->setupUi(this);
this->setWindowIcon(QIcon("://assets/images/appicons/64x64.png"));
m_ctx = MainWindow::getContext();
if(m_ctx == nullptr)
m_ctx = MainWindow::getContext();
this->setWindowIcon(QIcon("://assets/images/appicons/64x64.png"));
ui->tabWidget->setTabVisible(2, false);
ui->tabWidget->setTabVisible(4, false);