--- a/src/mainwindow.cpp Sun Mar 05 20:26:56 2017 +0200 +++ b/src/mainwindow.cpp Mon Mar 06 00:35:47 2017 +0200 @@ -50,8 +50,7 @@ // --------------------------------------------------------------------------------------------------------------------- // MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags) : - QMainWindow (parent, flags), - m_guiUtilities (new GuiUtilities (this)), + QMainWindow (parent, flags), m_primitives(new PrimitiveManager(this)), m_grid(new Grid), m_mathFunctions(new MathFunctions(this)), @@ -83,7 +82,7 @@ else updatePrimitives(); - m_quickColors = m_guiUtilities->loadQuickColorList(); + m_quickColors = GuiUtilities::loadQuickColorList(); updateActions(); // Connect all actions and save default sequences @@ -168,7 +167,6 @@ MainWindow::~MainWindow() { - delete m_guiUtilities; delete m_primitives; delete m_grid; delete m_mathFunctions; @@ -246,11 +244,11 @@ else { QToolButton* colorButton = new QToolButton; - colorButton->setIcon (m_guiUtilities->makeColorIcon (entry.color(), 16)); - colorButton->setIconSize (QSize (16, 16)); - colorButton->setToolTip (entry.color().name()); + colorButton->setIcon(GuiUtilities::makeColorIcon(entry.color(), 16)); + colorButton->setIconSize({16, 16}); + colorButton->setToolTip(entry.color().name()); - connect (colorButton, SIGNAL (clicked()), this, SLOT (quickColorClicked())); + connect(colorButton, SIGNAL (clicked()), this, SLOT (quickColorClicked())); ui.toolBarColors->addWidget (colorButton); m_colorButtons << colorButton; @@ -1221,11 +1219,6 @@ return m_externalPrograms; } -GuiUtilities* MainWindow::guiUtilities() -{ - return m_guiUtilities; -} - Grid* MainWindow::grid() { return m_grid;