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
+3 -3
View File
@@ -37,14 +37,14 @@ MainWindow * MainWindow::pMainWindow = nullptr;
MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
m_ctx(ctx),
m_aboutDialog(new AboutDialog(this)),
m_windowCalc(new CalcWindow(this))
m_ctx(ctx)
{
pMainWindow = this;
ui->setupUi(this);
m_windowSettings = new Settings(this);
m_aboutDialog = new AboutDialog(this);
m_windowCalc = new CalcWindow(this);
// light/dark theme
m_skins.insert("Native", "");