Cleanup: don't keep static variable of MainWindow

MainWindow is a "singleton" and has an instance() member function.
No point in keeping a second static pointer in subsurface-desktop-helper.cpp.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-02-05 23:43:13 +01:00 committed by Jan Mulder
parent 615307435c
commit f762367d53

View file

@ -14,27 +14,25 @@
#include "core/qt-gui.h"
static MainWindow *window = NULL;
void init_ui()
{
init_qt_late();
PluginManager::instance().loadPlugins();
window = new MainWindow();
MainWindow *window = new MainWindow();
window->setTitle();
}
void run_ui()
{
window->show();
MainWindow::instance()->show();
qApp->exec();
}
void exit_ui()
{
delete window;
delete MainWindow::instance();
delete qApp;
free((void *)existing_filename);
}