summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-27 16:26:54 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-27 16:26:58 -0700
commit9ae7040a91c3e3e0606d7abe085ef6da47efd6d2 (patch)
treede120b115df95fb96d945581aca41cd8c760263c /desktop-widgets/mainwindow.h
parent400b218f769320221567b7b66f39c33126a7d2e1 (diff)
downloadsubsurface-9ae7040a91c3e3e0606d7abe085ef6da47efd6d2.tar.gz
Revert the singleton PR
It turns out that this isn't working the way it was intended to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/mainwindow.h')
-rw-r--r--desktop-widgets/mainwindow.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h
index 4b91b0dc3..62cc1b6f1 100644
--- a/desktop-widgets/mainwindow.h
+++ b/desktop-widgets/mainwindow.h
@@ -21,7 +21,6 @@
#include "desktop-widgets/filterwidget2.h"
#include "core/applicationstate.h"
#include "core/gpslocation.h"
-#include "core/singleton.h"
#define NUM_RECENT_FILES 4
@@ -43,7 +42,7 @@ class LocationInformationWidget;
typedef std::pair<QByteArray, QVariant> WidgetProperty;
typedef QVector<WidgetProperty> PropertyList;
-class MainWindow : public QMainWindow, public SillySingleton<MainWindow> {
+class MainWindow : public QMainWindow {
Q_OBJECT
public:
enum {
@@ -62,6 +61,7 @@ public:
MainWindow();
~MainWindow();
+ static MainWindow *instance();
void loadRecentFiles();
void updateRecentFiles();
void updateRecentFilesMenu();
@@ -193,6 +193,7 @@ private:
QString filter_open();
QString filter_import();
QString filter_import_dive_sites();
+ static MainWindow *m_Instance;
QString displayedFilename(QString fullFilename);
bool askSaveChanges();
bool okToClose(QString message);