mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
615307435c
commit
f762367d53
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue